diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml
new file mode 100644
index 00000000..e893c62e
--- /dev/null
+++ b/.github/workflows/php.yml
@@ -0,0 +1,30 @@
+name: PHP Composer
+
+on:
+ push:
+ pull_request:
+
+jobs:
+ run:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ php-version:
+ - "7.4"
+ - "8.0"
+ - "8.1"
+ - "8.2"
+
+ name: Lint PHP ${{ matrix.php-version }}
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Setup PHP version
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php-version }}
+
+ - run: composer install
+ - run: composer test
diff --git a/.gitignore b/.gitignore
index 3547f762..1bcabeb5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,4 @@
/gw-resources/*
-.vagrant
+/blogs.dir/*
+/vendor/
+/composer.lock
diff --git a/.mailmap b/.mailmap
new file mode 100644
index 00000000..1f2f86fe
--- /dev/null
+++ b/.mailmap
@@ -0,0 +1 @@
+Michał Gołębiowski-Owczarek
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 9fe54231..089b211a 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,5 +1,22 @@
-Welcome! Thanks for your interest in contributing to jquery-wp-content. You're **almost** in the right place. More information on how to contribute to this and all other jQuery Foundation projects is over at [contribute.jquery.org](http://contribute.jquery.org). You'll definitely want to take a look at the articles on contributing [to our websites](http://contribute.jquery.org/web-sites/) and [code](http://contribute.jquery.org/code).
+# Contributing
-You may also want to take a look at our [commit & pull request guide](http://contribute.jquery.org/commits-and-pull-requests/) and [style guides](http://contribute.jquery.org/style-guide/) for instructions on how to maintain your fork and submit your code. Before we can merge any pull request, we'll also need you to sign our [contributor license agreement](http://contribute.jquery.org/cla).
+Welcome! Thanks for your interest in contributing to jquery-wp-content. More information on how to contribute to this and other projects is over at [contribute.jquery.org](https://contribute.jquery.org). You'll definitely want to take a look at the articles on contributing [to our websites](https://contribute.jquery.org/web-sites/) and [code](https://contribute.jquery.org/code).
-You can find us on [IRC](http://irc.jquery.org), specifically in #jquery-content should you have any questions. If you've never contributed to open source before, we've put together [a short guide with tips, tricks, and ideas on getting started](http://contribute.jquery.org/open-source/).
+You may also want to take a look at our [commit & pull request guide](https://contribute.jquery.org/commits-and-pull-requests/) and [style guides](https://contribute.jquery.org/style-guide/) for instructions on how to maintain your fork and submit your code. Before we can merge any pull request, we'll also need you to sign our [contributor license agreement](https://contribute.jquery.org/cla).
+
+You can [Chat on Gitter](https://gitter.im/jquery/dev), should you have any questions. If you've never contributed to open source before, we've put together [a short guide with tips, tricks, and ideas on getting started](https://contribute.jquery.org/open-source/).
+
+## Code knowledge
+
+### Protocol-relative URLs
+
+As of 2023, we run with the default WordPress settings to formatting and cleaning URLs. If revisiting this in the future, consider the following constraints:
+
+* When accessing sites in older browsers over HTTP instead of HTTPS, references to theme assets (e.g. stylesheets) must either use the current scheme, or use a protocol-relative URL, or be an absolute path URL without protocol or hostname (`theme_root_uri`).
+
+* Intra-site links to pages and categories should generally use a path or the canonical URL.
+
+* Avoid stripping the protocol from a `clean_url` filter as various uses require a full URL:
+ * Server-side requests, such as for `downloads.wordpress.org`, must specify an explicit protocol in the URL.
+ * When building `/wp-sitemap.xml`, URLs must be full and with the canonical protocol explicitly set. Sitemaps are invalid if they contain relative URLs.
+ * When outputting ` ` via `wp_head/rel_canonical`, the URL must be full and canonical. Or `rel_canonical` must be remove_action'ed replaced with a custom version that calls `esc_attr()` instead of `esc_url()` to avoid the `clean_url` filter.
diff --git a/INSTALL.md b/INSTALL.md
deleted file mode 100644
index 7f17a159..00000000
--- a/INSTALL.md
+++ /dev/null
@@ -1,123 +0,0 @@
-# jquery-wp-content
-
-`jquery-wp-content` is a **custom replacement** for the `wp-content` directory which contains the plugins, themes and site configuration to run the jQuery multi-site WordPress network.
-
-## Warning
-
-Configuring your own services can result in different configurations from the prodution environment. It is strongly encouraged to use the virtual machine environment as described in [README.md](README.md).
-
-## Prerequisites
-
-This install guide assumes you have certain prerequisites already configured within your environment.
-
-* Apache
-* Mysql
-* PHP
-
-## Installation
-
-1. Configure your local webserver with a virtual host that covers the relevant jQuery domains, such as `*.jquery.com` and `*.jqueryui.com`, all pointing to the same root. For example, in Apache:
-
-```
-
- ServerName local.jquery.com
- ServerAlias *.jquery.com *.jqueryui.com *.jquery.org *.qunitjs.com *.sizzlejs.com *.jquerymobile.com
- DocumentRoot "/srv/www/jquery"
- php_value memory_limit 256M
-
- Options All
- AllowOverride All
- Order allow,deny
- Allow from all
-
-
-```
-
-Make sure that virtual hosts are enabled as well:
-
-```
-NameVirtualHost *:80
-```
-
-Both blocks of code should be pasted into `extra/httpd-vhosts.conf`.
-Be sure to check `httpd.conf` to verify there is a line that includes
-`httpd-vhosts.conf`. It may already exist, but be commented out.
-
-Check `httpd.conf` to ensure that the PHP module is enabled as well.
-
-You do not need to configure your `/etc/hosts` file for `local.*` because `jquery.com`'s DNS handles this for you. However, if you plan to work offline, you can use the following rules:
-
-```
-127.0.0.1 local.jquery.com local.api.jquery.com local.blog.jquery.com local.books.jquery.com local.codeorigin.jquery.com local.learn.jquery.com local.plugins.jquery.com
-127.0.0.1 local.jqueryui.com local.api.jqueryui.com local.blog.jqueryui.com
-127.0.0.1 local.jquerymobile.com local.api.jquerymobile.com local.blog.jquerymobile.com
-127.0.0.1 local.jquery.org local.brand.jquery.org local.contribute.jquery.org local.events.jquery.org local.irc.jquery.org local.meetings.jquery.org
-127.0.0.1 local.qunitjs.com local.api.qunitjs.com
-127.0.0.1 local.sizzlejs.com
-```
-
-1. Place the WordPress core files **at** the document root you chose. For example, if you used `/srv/www/jquery`, you should unzip or clone WordPress directly into that directory, *not* a directory below it. **Do not install WordPress.** You can do this any number of ways:
- * Download the latest version from http://wordpress.org/latest.zip
- * Check out the latest tag from http://core.svn.wordpress.org/tags/
- * Clone the official WordPress Github mirror at https://github.com/WordPress/WordPress
-
-1. Clone `jquery-wp-content` inside of the directory where you put WordPress, so you have a file tree that looks like this:
-
-```
-├── jquery
-│ ├── gw-resources
-│ ├── index.php
-│ ├── jquery-wp-content
-│ ├── license.txt
-│ ├── readme.html
-│ ├── wp-activate.php
-│ ├── wp-admin
-│ ├── wp-blog-header.php
-│ ├── wp-comments-post.php
-│ ├── wp-config-sample.php
-│ ├── wp-content
-│ ├── ...
-│ └── xmlrpc.php
-```
-
-1. Create a MySQL database and user. You can choose any name you want for both. Follow the [WordPress instructions](http://codex.wordpress.org/Installing_WordPress#Step_2:_Create_the_Database_and_a_User) for a step by step guide.
-
-1. Copy `jquery-wp-content/wp-config-sample.php` and move it up one directory, to `wp-config.php`. Fill in your database credentials.
-
-1. Create an .htaccess file with the following content into that same document root:
-
-```
-RewriteEngine On
-RewriteBase /
-RewriteRule ^index\.php$ - [L]
-
-RewriteRule ^resources/?$ index.php [L]
-RewriteRule ^resources/(.+) gw-resources/%{HTTP_HOST}/$1 [L]
-
-# Add a trailing slash to the wp-admin of a subsite.
-RewriteRule ^([_0-9a-zA-Z\.-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
-
-RewriteCond %{REQUEST_FILENAME} -f [OR]
-RewriteCond %{REQUEST_FILENAME} -d
-RewriteRule ^ - [L]
-
-# Handle wp-admin, wp-includes, and root PHP files for subsites.
-RewriteRule ^[_0-9a-zA-Z\.-]+/((wp-admin|wp-includes).*) $1 [L]
-RewriteRule ^[_0-9a-zA-Z\.-]+/(.*\.php)$ $1 [L]
-
-RewriteRule . index.php [L]
-```
-
-1. Make sure that you have assigned your WordPress files and directories the correct permissions.
-For example, if your WordPress files are in the directory ```wordpress```, and you are running Apache under Mac OS X with the ```_www``` user:
-
-```
-sudo chown -R _www wordpress
-sudo chmod -R g+w wordpress
-```
-
-1. Restart your web server so the changes above are in use.
-
-1. Go to `http://local.jquery.com` and walk through the standard WordPress installation. `jquery-wp-content` includes a special install script that will initialize the entire network.
-
-1. Be sure to have node >= 0.8 installed on your system. Some sites, such as download.jqueryui.com, require that version or greater.
diff --git a/LICENSE.txt b/LICENSE.txt
index 46b4fe7c..7d5393a1 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,76 +1,3 @@
-Copyright jQuery Foundation and other contributors, https://jquery.org/
-
-This software consists of voluntary contributions made by many
-individuals. For exact contribution history, see the revision history
-available at https://github.com/jquery/jquery-wp-content
-
-All PHP files in this software that are not externally maintained
-libraries are derivative works of WordPress and licensed under the terms
-GPLv2 or later.
-
-====
-
-The following externally maintained libraries used by this software have
-their own licenses; we recommend you read them, as their terms may
-differ from the terms above.
-
-- Allow Numeric Stubs
- http://www.viper007bond.com/wordpress-plugins/allow-numeric-stubs/
- located at plugins/allow-numeric-stubs
-
-- Colorbox
- http://www.jacklmoore.com/colorbox/
- located at themes/jquery/js/plugins.js
-
-- FlexSlider
- http://www.woothemes.com/flexslider/
- located at themes/jquery/js/plugins.js
-
-- Grunt Wordpress
- https://github.com/scottgonzalez/grunt-wordpress
- located at mu-plugins/grunt-wodpress.php
-
-- matchMedia.js
- https://github.com/paulirish/matchMedia.js
- located at themes/jquery/js/plugins.js
-
-- Modernizr
- http://modernizr.com/
- located at themes/jquery/js/modernizr.custom.2.8.3.min.js
-
-- No Comments on Pages
- http://jaka.kubje.org/wp/software/no-comments-on-pages/
- located at plugins/no-comments-on-pages
-
-- Respond.js
- https://github.com/scottjehl/Respond
- located at themes/jquery/js/plugins.js
-
-- Stripe PHP Bindings
- https://github.com/stripe/stripe-php
- located at mu-plugins/jquery.org/lib/Stripe
-
-- TinyNav.js
- http://tinynav.viljamis.com
- located at themes/jquery/js/plugins.js
-
-- VaultPress
- http://vaultpress.com/
- located at plugins/vaultpress
-
-The design, layout, and look-and-feel of jquery-wp-content - including
-all CSS, images, and icons, except as noted above - are copyright jQuery
-Foundation and are not licensed for use. Designs and CSS from
-jquery-wp-content may not be used on any site, personal or commerical,
-without prior written consent from the jQuery Foundation.
-
-The only permitted (and encouraged) exception to "use" is the case of
-cloning/forking this repository in order to create a local development
-environment to facilitate making contributions to jQuery Foundation
-web sites.
-
-====
-
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
diff --git a/NOTICE.txt b/NOTICE.txt
new file mode 100644
index 00000000..d78dca0d
--- /dev/null
+++ b/NOTICE.txt
@@ -0,0 +1,52 @@
+Copyright jQuery Foundation and other contributors, https://github.com/jquery/jquery-wp-content
+
+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.
+
+====
+
+- Cairo
+ https://github.com/Gue3bara/Cairo
+ located at themes/jquery/lib/Cairo
+
+- Disable Emojis
+ https://wordpress.org/plugins/disable-emojis/
+ located at plugins/disable-emojis
+
+- Font Awesome
+ https://fontawesome.com/v3/
+ located at themes/jquery/lib/FontAwesome
+ and included in themes/jquery/css/base.css
+
+- Gilded Wordpress
+ https://github.com/scottgonzalez/grunt-wordpress
+ located at plugins/gilded-wordpress
+
+- Memcached
+ https://wordpress.org/plugins/memcached/
+ https://github.com/Automattic/wp-memcached/tree/35e1ea16f6b8cb8a1e6fbca124e33a44db21fa74 (2023-12-11)
+ located at plugins/memcached/
+
+- No Comments on Pages
+ https://wordpress.org/plugins/no-comments-on-pages/
+ located at plugins/no-comments-on-pages
+
+- Normalize.css
+ https://github.com/necolas/normalize.css/tree/v1.0.1
+ located at themes/jquery/lib/normalize
+ and included in themes/jquery/css/base.css
+
+- typesense-minibar
+ https://github.com/jquery/typesense-minibar
+ located at themes/jquery/lib/typesense-minibar
diff --git a/README.md b/README.md
index be1b7e01..9de076af 100644
--- a/README.md
+++ b/README.md
@@ -1,81 +1,22 @@
# jquery-wp-content
-`jquery-wp-content` is a **custom replacement** for the `wp-content` directory which contains the plugins, themes and site configuration to run the jQuery multi-site WordPress network.
+This repository provisions the `wp-content` directory of a WordPress installation, with the themes, plugins, and site options for jQuery Project websites.
-Although we recommend using the pre-built VM, if you would like to manually install `jquery-wp-content` you will find instructions for installing in the [INSTALL.md](INSTALL.md) file in this directory. We strongly recommend using the VM as it will provide the same environment as our production servers.
+## Getting started
-## Prerequisites
+### Production
-This setup guide assumes you have certain prerequisites installed.
+To learn how the sites are managed in production, refer to
+ .
-* [Virtualbox >=4.3+](https://www.virtualbox.org/)
-* [Vagrant >=1.4.0](http://www.vagrantup.com/)
+### Staging
-## Vagrant and Virtualbox
+Changes pushed to the `main` branch of this repository are automatically
+pulled onto the staging servers, which are publicly reachable via the
+`stage.*` subdomains of the live sites. For example, the staging site
+for is served at
-We recommend the combination of Virtualbox and [Vagrant](http://www.vagrantup.com/about.html) for a local development environment. Vagrant simplifies download, installation, and management of the local environment VM with a few commands.
+## Local
-### Setup
-
-From the root of your `jquery-wp-content` clone, run the following command:
-
-```
-vagrant up
-```
-
-This will start the VM for you, the output should look similar to what you see below.
-
-```
-Bringing machine 'default' up with 'virtualbox' provider...
-[default] Box 'jquery-wp-content' was not found. Fetching box from specified URL for
-the provider 'virtualbox'. Note that if the URL does not have
-a box for this provider, you should interrupt Vagrant now and add
-the box yourself. Otherwise Vagrant will attempt to download the
-full box prior to discovering this error.
-Downloading box from URL: http://boxes.jquery.com/jquery-wp-content.box
-Calculating and comparing box checksum...ime remaining: 0:00:01)
-Extracting box...
-Successfully added box 'jquery-wp-content' with provider 'virtualbox'!
-[default] Importing base box 'jquery-wp-content'...
-[default] Matching MAC address for NAT networking...
-[default] Setting the name of the VM...
-[default] Clearing any previously set forwarded ports...
-[default] Clearing any previously set network interfaces...
-[default] Preparing network interfaces based on configuration...
-[default] Forwarding ports...
-[default] -- 22 => 2222 (adapter 1)
-[default] Running 'pre-boot' VM customizations...
-[default] Booting VM...
-[default] Waiting for machine to boot. This may take a few minutes...
-[default] Machine booted and ready!
-[default] Setting hostname...
-[default] Configuring and enabling network interfaces...
-[default] Mounting shared folders...
-[default] -- /vagrant
-[default] -- /var/www/wordpress/jquery-wp-content
-```
-
-Complete the installation process by pointing your browser at http://vagrant.jquery.com/. Feel free to use any username/password/email combination that you choose, though keep note of the username and password as you will need them to deploy to your local VM.
-
-You do not need to configure your `/etc/hosts` file for `vagrant.*` because `jquery.com`'s DNS handles this for you. However, if you plan to work offline, you can use the following rules:
-
-```
-172.27.72.27 vagrant.jquery.com vagrant.api.jquery.com vagrant.blog.jquery.com vagrant.books.jquery.com vagrant.codeorigin.jquery.com vagrant.learn.jquery.com vagrant.plugins.jquery.com
-172.27.72.27 vagrant.jqueryui.com vagrant.api.jqueryui.com vagrant.blog.jqueryui.com
-172.27.72.27 vagrant.jquerymobile.com vagrant.api.jquerymobile.com vagrant.blog.jquerymobile.com
-172.27.72.27 vagrant.jquery.org vagrant.brand.jquery.org vagrant.contribute.jquery.org vagrant.events.jquery.org vagrant.irc.jquery.org vagrant.meetings.jquery.org
-172.27.72.27 vagrant.qunitjs.com vagrant.api.qunitjs.com
-172.27.72.27 vagrant.sizzlejs.com
-```
-
-### Stopping and Restarting the Virtual Machine
-
-When you're not working on `jquery-wp-content` you'll probably want to run `vagrant halt` to turn off the VM to save yourself some system resources. Alternatively you can suspend the VM by using `vagrant suspend`. You can always start the VM by running `vagrant up`.
-
-### Clean up
-
-Should you need to recover some harddrive space you can safely run the `vagrant destroy` command from within your `jquery-wp-content` clone. This will delete the VM image from your hard drive. **You will not lose any work by doing this.**
-
-## Auto-Updates
-
-Changes pushed to master are automatically pulled onto the stage domain.
+To help preview or debug changes locally during development,
+you can use .
diff --git a/Vagrantfile b/Vagrantfile
deleted file mode 100644
index bbc3afa6..00000000
--- a/Vagrantfile
+++ /dev/null
@@ -1,32 +0,0 @@
-# -*- mode: ruby -*-
-# vi: set ft=ruby :
-VAGRANTFILE_API_VERSION = "2"
-Vagrant.require_version ">= 1.4.0"
-
-Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
-
- # use the config key as the vm identifier
- config.vm.box = "jquery-wp-content"
- config.vm.box_download_checksum_type = "sha256"
- config.vm.box_download_checksum = "3182bc50668e86022e7d50bc8c096774b49de40cfaffc77f4fad75ca6cf83d3d"
-
- config.vm.box_url = "http://boxes.jquery.com/jquery-wp-content.box"
-
- config.vm.synced_folder "./", "/var/www/wordpress/jquery-wp-content"
-
- # assign an ip address in the hosts network
- config.vm.network "private_network", ip: "172.27.72.27"
-
- # set the hostname of the vm so puppet site.pp will react
- # with the right node config
- # config.vm.provision :shell, :inline => "hostname vagrant.jquery.com"
- config.vm.hostname = "vagrant.jquery.com"
-
- config.vm.provider "virtualbox" do |v|
- # make sure that the name makes sense when seen in the vbox GUI
- v.name = "jQuery Sites"
-
- # Be nice to our users.
- v.customize ["modifyvm", :id, "--cpuexecutioncap", "50"]
- end
-end
diff --git a/blogs.dir/.gitignore b/blogs.dir/.gitignore
deleted file mode 100644
index 72e8ffc0..00000000
--- a/blogs.dir/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*
diff --git a/composer.json b/composer.json
new file mode 100644
index 00000000..1da74c8f
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,21 @@
+{
+ "require": {
+ "php": ">= 7.4"
+ },
+ "require-dev": {
+ "php-parallel-lint/php-parallel-lint": "1.3.2"
+ },
+ "scripts": {
+ "test": "parallel-lint --exclude vendor/ .",
+ "deps": [
+ "curl -O -q --output-dir themes/jquery/lib/typesense-minibar 'https://raw.githubusercontent.com/jquery/typesense-minibar/1.3.4/{typesense-minibar.css,typesense-minibar.js,LICENSE.txt}'",
+ "curl -q https://raw.githubusercontent.com/jquery/typesense-minibar/1.3.4/typesense-minibar-foot.css >> themes/jquery/lib/typesense-minibar/typesense-minibar.css",
+
+ "curl -O -q --output-dir plugins/memcached 'https://raw.githubusercontent.com/Automattic/wp-memcached/35e1ea16f6b8cb8a1e6fbca124e33a44db21fa74/{object-cache.php,readme.txt,LICENSE}'",
+
+ "git rm -rf plugins/disable-emojis/",
+ "curl -s 'https://downloads.wordpress.org/plugin/disable-emojis.1.7.7.zip' | tar -xv -C plugins/",
+ "git add plugins/disable-emojis/"
+ ]
+ }
+}
diff --git a/config.php b/config.php
deleted file mode 100644
index c3d0ed3b..00000000
--- a/config.php
+++ /dev/null
@@ -1,105 +0,0 @@
-set_role( 'administrator' );
-
- $guess_url = wp_guess_url();
-
- foreach ( $wpdb->tables( 'ms_global' ) as $table => $prefixed_table )
- $wpdb->$table = $prefixed_table;
-
- install_network();
- populate_network( 1, $domain, $user_email, 'jQuery Network', $base, false );
-
- update_site_option( 'site_admins', array( $user->user_login ) );
- update_site_option( 'allowedthemes', array() );
-
- $wpdb->insert( $wpdb->blogs, array( 'site_id' => 1, 'domain' => $domain, 'path' => $base, 'registered' => current_time( 'mysql' ) ) );
- $blog_id = $wpdb->insert_id;
- update_user_meta( $user_id, 'source_domain', $domain );
- update_user_meta( $user_id, 'primary_blog', $blog_id );
- if ( !$upload_path = get_option( 'upload_path' ) ) {
- $upload_path = substr( WP_CONTENT_DIR, strlen( ABSPATH ) ) . '/uploads';
- update_option( 'upload_path', $upload_path );
- }
- update_option( 'fileupload_url', get_option( 'siteurl' ) . '/' . $upload_path );
-
- foreach ( jquery_sites() as $site => $details )
- jquery_install_site( $site, $user );
-
- wp_new_blog_notification( $blog_title, $guess_url, $user_id, $message = __( 'The password you chose during the install.' ) );
- wp_cache_flush();
-
- return array( 'url' => $guess_url, 'user_id' => $user_id, 'password' => $user_password, 'password_message' => $message );
-}
-
-function jquery_install_site( $site, $user ) {
- $sites = jquery_sites();
- $details = $sites[ $site ];
-
- if ( strpos( $site, '/' ) ) {
- list( $domain, $path ) = explode( '/', $site, 2 );
- $path = '/' . trim( $path, '/' ) . '/';
- } else {
- $domain = $site;
- $path = '/';
- }
-
- $default_options = jquery_default_site_options();
- $default_options['admin_email'] = $user->user_email;
-
- if ( 1 !== $details['blog_id'] ) {
- $blog_id = insert_blog( JQUERY_STAGING_PREFIX . $domain, $path, 1 );
- if ( $blog_id != $details['blog_id'] )
- wp_die( "Something went very wrong when trying to install $domain as site $blog_id-{$details['blog_id']}. Find nacin." );
-
- switch_to_blog( $blog_id );
-
- install_blog( $blog_id, $details['options']['blogname'] );
-
- add_user_to_blog( $blog_id, $user->ID, 'administrator' );
- }
-
- $options = array_merge( $default_options, $details['options'] );
- foreach ( $options as $option => $value )
- update_option( $option, $value );
-
- delete_option( 'rewrite_rules' );
- restore_current_blog();
-}
diff --git a/mu-plugins/_loader.php b/mu-plugins/_loader.php
index 86f5e060..809d1240 100644
--- a/mu-plugins/_loader.php
+++ b/mu-plugins/_loader.php
@@ -1,15 +1,13 @@
2 ) {
- foreach ( (array) glob( dirname( __FILE__ ) . "/$subdomain-sites/*.php" ) as $type_specific_file ) {
- require_once( $type_specific_file );
- }
- }
-}
-unset( $live_domain, $subdomain, $domain_specific_file, $type_specific_file );
+// Plugins enabled everywhere for local dev (jquery-wp-docker)
+//
+// For production, plugin enablement is managed via Puppet:
+// https://github.com/jquery/infrastructure-puppet/blob/staging/modules/profile/manifests/wordpress/docs.pp
+
+require_once __DIR__ . '/../plugins/disable-emojis/disable-emojis.php';
+require_once __DIR__ . '/../plugins/gilded-wordpress/gilded-wordpress.php';
+require_once __DIR__ . '/../plugins/jquery-actions.php';
+require_once __DIR__ . '/../plugins/jquery-filters.php';
+require_once __DIR__ . '/../plugins/jquery-tags-on-pages.php';
+require_once __DIR__ . '/../plugins/redirects.php';
diff --git a/mu-plugins/analytics.php b/mu-plugins/analytics.php
deleted file mode 100644
index 6d3075ce..00000000
--- a/mu-plugins/analytics.php
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-is_main_query() || ! $query->is_search() ||
- is_null( $query->query_vars[ 'search_term' ] ) ) {
- return $posts;
- }
-
- $priorities = array_fill( 0, 4, array() );
-
- $search_terms = $query->query_vars['search_terms'];
- $search_terms = array_map( 'strtolower', $search_terms );
- foreach ( $posts as $post ) {
- if ( strtolower( $post->post_title ) === implode( ' ', $search_terms ) ) {
- // Perfect title match: Priority 0.
- $priorities[0][] = $post;
- continue;
- }
-
- foreach ( array( 1 => 'post_title', 2 => 'post_excerpt' ) as $priority => $field ) {
- foreach ( $search_terms as $search_term ) {
- // A search term is not present in the field, so move to the next field.
- if ( false === stripos( $post->$field, $search_term ) )
- continue 2;
- }
-
- // Found all matching terms in this field, so add it to the respective priority.
- $priorities[ $priority ][] = $post;
- continue 2;
- }
-
- // No matches in a priority field, so assume the post got here via the content.
- $priorities[3][] = $post;
- }
-
- return array_merge( $priorities[0], $priorities[1], $priorities[2], $priorities[3] );
-}, 10, 2 );
\ No newline at end of file
diff --git a/mu-plugins/events.jquery.org/posts.php b/mu-plugins/events.jquery.org/posts.php
deleted file mode 100644
index c3129970..00000000
--- a/mu-plugins/events.jquery.org/posts.php
+++ /dev/null
@@ -1,15 +0,0 @@
-post_name;
- unset( $query_vars[ 'year' ] );
- }
- }
-
- return $query_vars;
-});
diff --git a/mu-plugins/jquery-actions.php b/mu-plugins/jquery-actions.php
deleted file mode 100644
index de1dd2ea..00000000
--- a/mu-plugins/jquery-actions.php
+++ /dev/null
@@ -1,44 +0,0 @@
- and header.
-remove_action( 'wp_head', 'wp_shortlink_wp_head', 10 );
-remove_action( 'template_redirect', 'wp_shortlink_header', 11 );
-
-add_action( 'init', function() {
- global $events;
-
- $events = array(
- 'future' => array(),
- 'past' => array(),
- 'year' => array(),
- );
-
- $eventsFile = gw_resources_dir(
- (JQUERY_STAGING ? JQUERY_STAGING_PREFIX : '') . 'events.jquery.org'
- ) . '/events.json';
- $allEvents = file_exists( $eventsFile ) ?
- json_decode( file_get_contents( $eventsFile ) ) :
- array();
-
- $now = time();
- foreach ( $allEvents as $event ) {
- $event->end = strtotime( $event-> end );
- $year = Date('Y', $event->end);
-
- $events[ 'year' ][ $year ][] = $event;
- if ( $event->end > $now ) {
- $events[ 'future' ][] = $event;
- } else {
- $events[ 'past' ][ $year ][] = $event;
- }
- }
-
- $events[ 'past' ] = array_reverse( $events[ 'past' ], true );
-});
diff --git a/mu-plugins/jquery-filters.php b/mu-plugins/jquery-filters.php
deleted file mode 100644
index 9d32aac8..00000000
--- a/mu-plugins/jquery-filters.php
+++ /dev/null
@@ -1,117 +0,0 @@
- $value ) {
- if ( 'stylesheet' === $option || 'template' === $option )
- continue; // Don't mess with themes for now.
- add_filter( 'pre_option_' . $option, function( $null ) use ( $value, $blog_id ) {
- if ( $blog_id == get_current_blog_id() )
- return $value;
- return $null;
- } );
-}
-unset( $sites, $options, $option );
-
-// Disable WordPress auto-paragraphing for posts.
-remove_filter( 'the_content', 'wpautop' );
-
-// Disable WordPress text transformations (smart quotes, etc.) for posts.
-remove_filter( 'the_content', 'wptexturize' );
-
-// Disable more restrictive multisite upload settings.
-remove_filter( 'upload_mimes', 'check_upload_mimes' );
-// Give unfiltered upload ability to super admins.
-define( 'ALLOW_UNFILTERED_UPLOADS', true );
-// Until unfiltered uploads make it into XML-RPC:
-add_filter( 'upload_mimes', function( $mimes ) {
- $mimes['eot'] = 'application/vnd.ms-fontobject';
- $mimes['svg'] = 'image/svg+xml';
- $mimes['ttf'] = 'application/x-font-ttf';
- $mimes['woff'] = 'application/font-woff';
- $mimes['xml'] = 'text/xml';
- $mimes['php'] = 'application/x-php';
- $mimes['json'] = 'application/json';
- return $mimes;
-} );
-
-// Increase file size limit to 1GB
-add_filter( 'pre_site_option_fileupload_maxk', function() {
- return 1024 * 1024;
-} );
-
-// Allow full HTML in term descriptions.
-add_action( 'init', 'jquery_unfiltered_html_for_term_descriptions' );
-add_action( 'set_current_user', 'jquery_unfiltered_html_for_term_descriptions' );
-function jquery_unfiltered_html_for_term_descriptions() {
- remove_filter( 'pre_term_description', 'wp_filter_kses' );
- remove_filter( 'pre_term_description', 'wp_filter_post_kses' );
- if ( ! current_user_can( 'unfiltered_html' ) )
- add_filter( 'pre_term_description', 'wp_filter_post_kses' );
-}
-
-// Bypass multisite checks.
-add_filter( 'ms_site_check', '__return_true' );
-
-// Add body classes found in postmeta.
-add_filter( 'body_class', function( $classes ) {
- $sites = jquery_sites();
- if ( isset( $sites[ JQUERY_LIVE_SITE ]['body_class'] ) )
- array_unshift( $classes, $sites[ JQUERY_LIVE_SITE ]['body_class'] );
- if ( 0 === strpos( JQUERY_LIVE_SITE, 'api.' ) )
- array_unshift( $classes, 'api' );
-
- if ( is_page() )
- $classes[] = 'page-slug-' . sanitize_html_class( strtolower( get_queried_object()->post_name ) );
- if ( is_singular() && $post_classes = get_post_meta( get_queried_object_id(), 'body_class', true ) )
- $classes = array_merge( $classes, explode( ' ', $post_classes ) );
-
- if ( is_archive() || is_search() ) {
- $classes[] = 'listing';
- }
-
- return $classes;
-});
-
-add_filter( 'option_uploads_use_yearmonth_folders', '__return_false' );
-add_filter( 'upload_dir', function( $upload_dir ) {
- if ( defined( 'UPLOADS' ) ) {
- $upload_dir['path'] = $upload_dir['basedir'] = UPLOADS;
- } else {
- $upload_dir['path'] = $upload_dir['basedir'] = WP_CONTENT_DIR . '/uploads';
- }
-
- return $upload_dir;
-});
-
-add_filter( 'get_terms', function( $terms, $taxonomies, $args ) {
- if ( !isset( $args[ 'orderby' ] ) || $args[ 'orderby' ] !== 'natural' ) {
- return $terms;
- }
-
- $sortedTerms = array();
- foreach( $terms as $term ) {
- $sortedTerms[ $term->name ] = $term;
- }
- uksort( $sortedTerms, 'strnatcasecmp' );
-
- if ( strtolower( $args[ 'order' ] ) === 'desc' ) {
- $sortedTerms = array_reverse( $sortedTerms );
- }
-
- return $sortedTerms;
-}, 20, 3 );
-
-// Strip protocol from urls making them protocol agnostic.
-add_filter( 'theme_root_uri', 'strip_https', 10, 1 );
-add_filter( 'clean_url', 'strip_https', 11, 1 );
-function strip_https($url) {
- return preg_replace( '/^https?:/', '', $url );
-}
diff --git a/mu-plugins/jquery.com/jquery-filters.php b/mu-plugins/jquery.com/jquery-filters.php
deleted file mode 100644
index f410da81..00000000
--- a/mu-plugins/jquery.com/jquery-filters.php
+++ /dev/null
@@ -1,35 +0,0 @@
-');
- if ( $memberPos === false ) {
- return $content;
- }
-
- $members = json_decode( file_get_contents( GW_RESOURCE_DIR . '/corporate-members.json' ), true );
- shuffle( $members );
-
- $memberContent = '';
- foreach( $members as $index => $member ) {
-
- // Only show four members at a time
- if ( $index >= 4 ) {
- break;
- }
-
- $logoUrl = "//jquery.org/resources/members/" .
- preg_replace( '/[^a-z0-9]/', '', strtolower( $member[ 'name' ] ) ) . ".png";
- $memberContent .=
- '' .
- '' .
- ' ' .
- ' ' .
- ' ' .
- ' ';
- }
- $memberContent .= ' ';
-
- return str_replace( '', $memberContent, $content );
-} );
-
-?>
diff --git a/mu-plugins/jquery.org/lib/Stripe.php b/mu-plugins/jquery.org/lib/Stripe.php
deleted file mode 100644
index 68658828..00000000
--- a/mu-plugins/jquery.org/lib/Stripe.php
+++ /dev/null
@@ -1,45 +0,0 @@
-_apiKey = $apiKey;
- }
-
- public static function apiUrl($url='')
- {
- $apiBase = Stripe::$apiBase;
- return "$apiBase$url";
- }
-
- public static function utf8($value)
- {
- if (is_string($value))
- return utf8_encode($value);
- else
- return $value;
- }
-
- private static function _encodeObjects($d)
- {
- if ($d instanceof Stripe_ApiResource) {
- return $d->id;
- } else if ($d === true) {
- return 'true';
- } else if ($d === false) {
- return 'false';
- } else if (is_array($d)) {
- $res = array();
- foreach ($d as $k => $v)
- $res[$k] = self::_encodeObjects($v);
- return $res;
- } else {
- return $d;
- }
- }
-
- public static function encode($d)
- {
- return http_build_query($d, null, '&');
- }
-
- public function request($meth, $url, $params=null)
- {
- if (!$params)
- $params = array();
- list($rbody, $rcode, $myApiKey) = $this->_requestRaw($meth, $url, $params);
- $resp = $this->_interpretResponse($rbody, $rcode);
- return array($resp, $myApiKey);
- }
-
- public function handleApiError($rbody, $rcode, $resp)
- {
- if (!is_array($resp) || !isset($resp['error']))
- throw new Stripe_ApiError("Invalid response object from API: $rbody (HTTP response code was $rcode)", $rcode, $rbody, $resp);
- $error = $resp['error'];
- switch ($rcode) {
- case 400:
- case 404:
- throw new Stripe_InvalidRequestError(isset($error['message']) ? $error['message'] : null,
- isset($error['param']) ? $error['param'] : null,
- $rcode, $rbody, $resp);
- case 401:
- throw new Stripe_AuthenticationError(isset($error['message']) ? $error['message'] : null, $rcode, $rbody, $resp);
- case 402:
- throw new Stripe_CardError(isset($error['message']) ? $error['message'] : null,
- isset($error['param']) ? $error['param'] : null,
- isset($error['code']) ? $error['code'] : null,
- $rcode, $rbody, $resp);
- default:
- throw new Stripe_ApiError(isset($error['message']) ? $error['message'] : null, $rcode, $rbody, $resp);
- }
- }
-
- private function _requestRaw($meth, $url, $params)
- {
- $myApiKey = $this->_apiKey;
- if (!$myApiKey)
- $myApiKey = Stripe::$apiKey;
- if (!$myApiKey)
- throw new Stripe_AuthenticationError('No API key provided. (HINT: set your API key using "Stripe::setApiKey()". You can generate API keys from the Stripe web interface. See https://stripe.com/api for details, or email support@stripe.com if you have any questions.');
-
- $absUrl = $this->apiUrl($url);
- $params = self::_encodeObjects($params);
- $langVersion = phpversion();
- $uname = php_uname();
- $ua = array('bindings_version' => Stripe::VERSION,
- 'lang' => 'php',
- 'lang_version' => $langVersion,
- 'publisher' => 'stripe',
- 'uname' => $uname);
- $headers = array('X-Stripe-Client-User-Agent: ' . json_encode($ua),
- 'User-Agent: Stripe/v1 PhpBindings/' . Stripe::VERSION,
- 'Authorization: Bearer ' . $myApiKey);
- list($rbody, $rcode) = $this->_curlRequest($meth, $absUrl, $headers, $params);
- return array($rbody, $rcode, $myApiKey);
- }
-
- private function _interpretResponse($rbody, $rcode)
- {
- try {
- $resp = json_decode($rbody, true);
- } catch (Exception $e) {
- throw new Stripe_ApiError("Invalid response body from API: $rbody (HTTP response code was $rcode)", $rcode, $rbody);
- }
-
- if ($rcode < 200 || $rcode >= 300) {
- $this->handleApiError($rbody, $rcode, $resp);
- }
- return $resp;
- }
-
- private function _curlRequest($meth, $absUrl, $headers, $params)
- {
- $curl = curl_init();
- $meth = strtolower($meth);
- $opts = array();
- if ($meth == 'get') {
- $opts[CURLOPT_HTTPGET] = 1;
- if (count($params) > 0) {
- $encoded = self::encode($params);
- $absUrl = "$absUrl?$encoded";
- }
- } else if ($meth == 'post') {
- $opts[CURLOPT_POST] = 1;
- $opts[CURLOPT_POSTFIELDS] = self::encode($params);
- } else if ($meth == 'delete') {
- $opts[CURLOPT_CUSTOMREQUEST] = 'DELETE';
- if (count($params) > 0) {
- $encoded = self::encode($params);
- $absUrl = "$absUrl?$encoded";
- }
- } else {
- throw new Stripe_ApiError("Unrecognized method $meth");
- }
-
- $absUrl = self::utf8($absUrl);
- $opts[CURLOPT_URL] = $absUrl;
- $opts[CURLOPT_RETURNTRANSFER] = true;
- $opts[CURLOPT_CONNECTTIMEOUT] = 30;
- $opts[CURLOPT_TIMEOUT] = 80;
- $opts[CURLOPT_RETURNTRANSFER] = true;
- $opts[CURLOPT_HTTPHEADER] = $headers;
- if (!Stripe::$verifySslCerts)
- $opts[CURLOPT_SSL_VERIFYPEER] = false;
-
- curl_setopt_array($curl, $opts);
- $rbody = curl_exec($curl);
-
- $errno = curl_errno($curl);
- if ($errno == CURLE_SSL_CACERT ||
- $errno == CURLE_SSL_PEER_CERTIFICATE ||
- $errno == 77 // CURLE_SSL_CACERT_BADFILE (constant not defined in PHP though)
- ) {
- array_push($headers, 'X-Stripe-Client-Info: {"ca":"using Stripe-supplied CA bundle"}');
- curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
- curl_setopt($curl, CURLOPT_CAINFO,
- dirname(__FILE__) . '/../data/ca-certificates.crt');
- $rbody = curl_exec($curl);
- }
-
- if ($rbody === false) {
- $errno = curl_errno($curl);
- $message = curl_error($curl);
- curl_close($curl);
- $this->handleCurlError($errno, $message);
- }
-
- $rcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
- curl_close($curl);
- return array($rbody, $rcode);
- }
-
- public function handleCurlError($errno, $message)
- {
- $apiBase = Stripe::$apiBase;
- switch ($errno) {
- case CURLE_COULDNT_CONNECT:
- case CURLE_COULDNT_RESOLVE_HOST:
- case CURLE_OPERATION_TIMEOUTED:
- $msg = "Could not connect to Stripe ($apiBase). Please check your internet connection and try again. If this problem persists, you should check Stripe's service status at https://twitter.com/stripestatus, or let us know at support@stripe.com.";
- break;
- case CURLE_SSL_CACERT:
- case CURLE_SSL_PEER_CERTIFICATE:
- $msg = "Could not verify Stripe's SSL certificate. Please make sure that your network is not intercepting certificates. (Try going to $apiBase in your browser.) If this problem persists, let us know at support@stripe.com.";
- break;
- default:
- $msg = "Unexpected error communicating with Stripe. If this problem persists, let us know at support@stripe.com.";
- }
-
- $msg .= "\n\n(Network error [errno $errno]: $message)";
- throw new Stripe_ApiConnectionError($msg);
- }
-}
diff --git a/mu-plugins/jquery.org/lib/Stripe/ApiResource.php b/mu-plugins/jquery.org/lib/Stripe/ApiResource.php
deleted file mode 100755
index 98be3eab..00000000
--- a/mu-plugins/jquery.org/lib/Stripe/ApiResource.php
+++ /dev/null
@@ -1,104 +0,0 @@
-refresh();
- return $instance;
- }
-
- public function refresh()
- {
- $requestor = new Stripe_ApiRequestor($this->_apiKey);
- $url = $this->instanceUrl();
-
- list($response, $apiKey) = $requestor->request('get', $url);
- $this->refreshFrom($response, $apiKey);
- return $this;
- }
-
- public static function className($class)
- {
- // Useful for namespaces: Foo\Stripe_Charge
- if ($postfix = strrchr($class, '\\'))
- $class = substr($postfix, 1);
- if (substr($class, 0, strlen('Stripe')) == 'Stripe')
- $class = substr($class, strlen('Stripe'));
- $class = str_replace('_', '', $class);
- $name = urlencode($class);
- $name = strtolower($name);
- return $name;
- }
-
- public static function classUrl($class)
- {
- $base = self::className($class);
- return "/v1/${base}s";
- }
-
- public function instanceUrl()
- {
- $id = $this['id'];
- $class = get_class($this);
- if (!$id) {
- throw new Stripe_InvalidRequestError("Could not determine which URL to request: $class instance has invalid ID: $id", null);
- }
- $id = Stripe_ApiRequestor::utf8($id);
- $base = self::classUrl($class);
- $extn = urlencode($id);
- return "$base/$extn";
- }
-
- private static function _validateCall($method, $params=null, $apiKey=null)
- {
- if ($params && !is_array($params))
- throw new Stripe_Error("You must pass an array as the first argument to Stripe API method calls. (HINT: an example call to create a charge would be: \"StripeCharge::create(array('amount' => 100, 'currency' => 'usd', 'card' => array('number' => 4242424242424242, 'exp_month' => 5, 'exp_year' => 2015)))\")");
- if ($apiKey && !is_string($apiKey))
- throw new Stripe_Error('The second argument to Stripe API method calls is an optional per-request apiKey, which must be a string. (HINT: you can set a global apiKey by "Stripe::setApiKey()")');
- }
-
- protected static function _scopedAll($class, $params=null, $apiKey=null)
- {
- self::_validateCall('all', $params, $apiKey);
- $requestor = new Stripe_ApiRequestor($apiKey);
- $url = self::classUrl($class);
- list($response, $apiKey) = $requestor->request('get', $url, $params);
- return Stripe_Util::convertToStripeObject($response, $apiKey);
- }
-
- protected static function _scopedCreate($class, $params=null, $apiKey=null)
- {
- self::_validateCall('create', $params, $apiKey);
- $requestor = new Stripe_ApiRequestor($apiKey);
- $url = self::classUrl($class);
- list($response, $apiKey) = $requestor->request('post', $url, $params);
- return Stripe_Util::convertToStripeObject($response, $apiKey);
- }
-
- protected function _scopedSave($class)
- {
- self::_validateCall('save');
- if ($this->_unsavedValues) {
- $requestor = new Stripe_ApiRequestor($this->_apiKey);
- $params = array();
- foreach ($this->_unsavedValues->toArray() as $k)
- $params[$k] = $this->$k;
- $url = $this->instanceUrl();
- list($response, $apiKey) = $requestor->request('post', $url, $params);
- $this->refreshFrom($response, $apiKey);
- }
- return $this;
- }
-
- protected function _scopedDelete($class, $params=null)
- {
- self::_validateCall('delete');
- $requestor = new Stripe_ApiRequestor($this->_apiKey);
- $url = $this->instanceUrl();
- list($response, $apiKey) = $requestor->request('delete', $url, $params);
- $this->refreshFrom($response, $apiKey);
- return $this;
- }
-}
diff --git a/mu-plugins/jquery.org/lib/Stripe/AuthenticationError.php b/mu-plugins/jquery.org/lib/Stripe/AuthenticationError.php
deleted file mode 100755
index 0c820305..00000000
--- a/mu-plugins/jquery.org/lib/Stripe/AuthenticationError.php
+++ /dev/null
@@ -1,5 +0,0 @@
-param = $param;
- $this->code = $code;
- }
-}
diff --git a/mu-plugins/jquery.org/lib/Stripe/Charge.php b/mu-plugins/jquery.org/lib/Stripe/Charge.php
deleted file mode 100755
index ae5cda7c..00000000
--- a/mu-plugins/jquery.org/lib/Stripe/Charge.php
+++ /dev/null
@@ -1,55 +0,0 @@
-_apiKey);
- $url = $this->instanceUrl() . '/refund';
- list($response, $apiKey) = $requestor->request('post', $url, $params);
- $this->refreshFrom($response, $apiKey);
- return $this;
- }
-
- public function capture($params=null)
- {
- $requestor = new Stripe_ApiRequestor($this->_apiKey);
- $url = $this->instanceUrl() . '/capture';
- list($response, $apiKey) = $requestor->request('post', $url, $params);
- $this->refreshFrom($response, $apiKey);
- return $this;
- }
-
- public function updateDispute($params=null)
- {
- $requestor = new Stripe_ApiRequestor($this->_apiKey);
- $url = $this->instanceUrl() . '/dispute';
- list($response, $apiKey) = $requestor->request('post', $url, $params);
- $this->refreshFrom(array('dispute' => $response), $apiKey, true);
- return $this->dispute;
- }
-}
\ No newline at end of file
diff --git a/mu-plugins/jquery.org/lib/Stripe/Coupon.php b/mu-plugins/jquery.org/lib/Stripe/Coupon.php
deleted file mode 100755
index 9ead002c..00000000
--- a/mu-plugins/jquery.org/lib/Stripe/Coupon.php
+++ /dev/null
@@ -1,34 +0,0 @@
-id;
- $ii = Stripe_InvoiceItem::create($params, $this->_apiKey);
- return $ii;
- }
-
- public function invoices($params=null)
- {
- if (!$params)
- $params = array();
- $params['customer'] = $this->id;
- $invoices = Stripe_Invoice::all($params, $this->_apiKey);
- return $invoices;
- }
-
- public function invoiceItems($params=null)
- {
- if (!$params)
- $params = array();
- $params['customer'] = $this->id;
- $iis = Stripe_InvoiceItem::all($params, $this->_apiKey);
- return $iis;
- }
-
- public function charges($params=null)
- {
- if (!$params)
- $params = array();
- $params['customer'] = $this->id;
- $charges = Stripe_Charge::all($params, $this->_apiKey);
- return $charges;
- }
-
- public function updateSubscription($params=null)
- {
- $requestor = new Stripe_ApiRequestor($this->_apiKey);
- $url = $this->instanceUrl() . '/subscription';
- list($response, $apiKey) = $requestor->request('post', $url, $params);
- $this->refreshFrom(array('subscription' => $response), $apiKey, true);
- return $this->subscription;
- }
-
- public function cancelSubscription($params=null)
- {
- $requestor = new Stripe_ApiRequestor($this->_apiKey);
- $url = $this->instanceUrl() . '/subscription';
- list($response, $apiKey) = $requestor->request('delete', $url, $params);
- $this->refreshFrom(array('subscription' => $response), $apiKey, true);
- return $this->subscription;
- }
-
- public function deleteDiscount()
- {
- $requestor = new Stripe_ApiRequestor($this->_apiKey);
- $url = $this->instanceUrl() . '/discount';
- list($response, $apiKey) = $requestor->request('delete', $url);
- $this->refreshFrom(array('discount' => null), $apiKey, true);
- }
-}
diff --git a/mu-plugins/jquery.org/lib/Stripe/Error.php b/mu-plugins/jquery.org/lib/Stripe/Error.php
deleted file mode 100755
index 89619567..00000000
--- a/mu-plugins/jquery.org/lib/Stripe/Error.php
+++ /dev/null
@@ -1,27 +0,0 @@
-http_status = $http_status;
- $this->http_body = $http_body;
- $this->json_body = $json_body;
- }
-
- public function getHttpStatus()
- {
- return $this->http_status;
- }
-
- public function getHttpBody()
- {
- return $this->http_body;
- }
-
- public function getJsonBody()
- {
- return $this->json_body;
- }
-}
diff --git a/mu-plugins/jquery.org/lib/Stripe/Event.php b/mu-plugins/jquery.org/lib/Stripe/Event.php
deleted file mode 100755
index 1c73bd1c..00000000
--- a/mu-plugins/jquery.org/lib/Stripe/Event.php
+++ /dev/null
@@ -1,22 +0,0 @@
-param = $param;
- }
-}
diff --git a/mu-plugins/jquery.org/lib/Stripe/Invoice.php b/mu-plugins/jquery.org/lib/Stripe/Invoice.php
deleted file mode 100755
index 458643ec..00000000
--- a/mu-plugins/jquery.org/lib/Stripe/Invoice.php
+++ /dev/null
@@ -1,51 +0,0 @@
-request('get', $url, $params);
- return Stripe_Util::convertToStripeObject($response, $apiKey);
- }
-
- public function save()
- {
- $class = get_class();
- return self::_scopedSave($class);
- }
-
- public function pay()
- {
- $requestor = new Stripe_ApiRequestor($this->_apiKey);
- $url = $this->instanceUrl() . '/pay';
- list($response, $apiKey) = $requestor->request('post', $url);
- $this->refreshFrom($response, $apiKey);
- return $this;
- }
-}
diff --git a/mu-plugins/jquery.org/lib/Stripe/InvoiceItem.php b/mu-plugins/jquery.org/lib/Stripe/InvoiceItem.php
deleted file mode 100755
index a93ddada..00000000
--- a/mu-plugins/jquery.org/lib/Stripe/InvoiceItem.php
+++ /dev/null
@@ -1,40 +0,0 @@
-_apiKey);
- list($response, $apiKey) = $requestor->request('get', $this['url'], $params);
- return Stripe_Util::convertToStripeObject($response, $apiKey);
- }
-}
diff --git a/mu-plugins/jquery.org/lib/Stripe/Object.php b/mu-plugins/jquery.org/lib/Stripe/Object.php
deleted file mode 100755
index f334ca6d..00000000
--- a/mu-plugins/jquery.org/lib/Stripe/Object.php
+++ /dev/null
@@ -1,144 +0,0 @@
-_apiKey = $apiKey;
- $this->_values = array();
- $this->_unsavedValues = new Stripe_Util_Set();
- $this->_transientValues = new Stripe_Util_Set();
- if ($id)
- $this->id = $id;
- }
-
- // Standard accessor magic methods
- public function __set($k, $v)
- {
- // TODO: may want to clear from $_transientValues. (Won't be user-visible.)
- $this->_values[$k] = $v;
- if (!self::$_permanentAttributes->includes($k))
- $this->_unsavedValues->add($k);
- }
- public function __isset($k)
- {
- return isset($this->_values[$k]);
- }
- public function __unset($k)
- {
- unset($this->_values[$k]);
- $this->_transientValues->add($k);
- $this->_unsavedValues->discard($k);
- }
- public function __get($k)
- {
- if (array_key_exists($k, $this->_values)) {
- return $this->_values[$k];
- } else if ($this->_transientValues->includes($k)) {
- $class = get_class($this);
- $attrs = join(', ', array_keys($this->_values));
- error_log("Stripe Notice: Undefined property of $class instance: $k. HINT: The $k attribute was set in the past, however. It was then wiped when refreshing the object with the result returned by Stripe's API, probably as a result of a save(). The attributes currently available on this object are: $attrs");
- return null;
- } else {
- $class = get_class($this);
- error_log("Stripe Notice: Undefined property of $class instance: $k");
- return null;
- }
- }
-
- // ArrayAccess methods
- public function offsetSet($k, $v)
- {
- $this->$k = $v;
- }
-
- public function offsetExists($k)
- {
- return array_key_exists($k, $this->_values);
- }
-
- public function offsetUnset($k)
- {
- unset($this->$k);
- }
- public function offsetGet($k)
- {
- return array_key_exists($k, $this->_values) ? $this->_values[$k] : null;
- }
-
- // This unfortunately needs to be public to be used in Util.php
- public static function scopedConstructFrom($class, $values, $apiKey=null)
- {
- $obj = new $class(isset($values['id']) ? $values['id'] : null, $apiKey);
- $obj->refreshFrom($values, $apiKey);
- return $obj;
- }
-
- public static function constructFrom($values, $apiKey=null)
- {
- $class = get_class();
- return self::scopedConstructFrom($class, $values, $apiKey);
- }
-
- public function refreshFrom($values, $apiKey, $partial=false)
- {
- $this->_apiKey = $apiKey;
- // Wipe old state before setting new. This is useful for e.g. updating a
- // customer, where there is no persistent card parameter. Mark those values
- // which don't persist as transient
- if ($partial)
- $removed = new Stripe_Util_Set();
- else
- $removed = array_diff(array_keys($this->_values), array_keys($values));
-
- foreach ($removed as $k) {
- if (self::$_permanentAttributes->includes($k))
- continue;
- unset($this->$k);
- }
-
- foreach ($values as $k => $v) {
- if (self::$_permanentAttributes->includes($k))
- continue;
- $this->_values[$k] = Stripe_Util::convertToStripeObject($v, $apiKey);
- $this->_transientValues->discard($k);
- $this->_unsavedValues->discard($k);
- }
- }
-
- public function __toJSON()
- {
- if (defined('JSON_PRETTY_PRINT'))
- return json_encode($this->__toArray(true), JSON_PRETTY_PRINT);
- else
- return json_encode($this->__toArray(true));
- }
-
- public function __toString()
- {
- return $this->__toJSON();
- }
-
- public function __toArray($recursive=false)
- {
- if ($recursive)
- return Stripe_Util::convertStripeObjectToArray($this->_values);
- else
- return $this->_values;
- }
-}
-
-
-Stripe_Object::init();
diff --git a/mu-plugins/jquery.org/lib/Stripe/Plan.php b/mu-plugins/jquery.org/lib/Stripe/Plan.php
deleted file mode 100755
index 171b6735..00000000
--- a/mu-plugins/jquery.org/lib/Stripe/Plan.php
+++ /dev/null
@@ -1,40 +0,0 @@
-refresh();
- return $instance;
- }
-
- public static function classUrl($class)
- {
- $base = self::className($class);
- return "/v1/${base}";
- }
-
- public function instanceUrl()
- {
- $class = get_class($this);
- $base = self::classUrl($class);
- return "$base";
- }
-}
diff --git a/mu-plugins/jquery.org/lib/Stripe/Stripe.php b/mu-plugins/jquery.org/lib/Stripe/Stripe.php
deleted file mode 100755
index d6563dbf..00000000
--- a/mu-plugins/jquery.org/lib/Stripe/Stripe.php
+++ /dev/null
@@ -1,27 +0,0 @@
- $v) {
- // FIXME: this is an encapsulation violation
- if (Stripe_Object::$_permanentAttributes->includes($k)) {
- continue;
- }
- if ($v instanceof Stripe_Object) {
- $results[$k] = $v->__toArray(true);
- }
- else if (is_array($v)) {
- $results[$k] = self::convertStripeObjectToArray($v);
- }
- else {
- $results[$k] = $v;
- }
- }
- return $results;
- }
-
- public static function convertToStripeObject($resp, $apiKey)
- {
- $types = array('charge' => 'Stripe_Charge',
- 'customer' => 'Stripe_Customer',
- 'list' => 'Stripe_List',
- 'invoice' => 'Stripe_Invoice',
- 'invoiceitem' => 'Stripe_InvoiceItem', 'event' => 'Stripe_Event',
- 'transfer' => 'Stripe_Transfer');
- if (self::isList($resp)) {
- $mapped = array();
- foreach ($resp as $i)
- array_push($mapped, self::convertToStripeObject($i, $apiKey));
- return $mapped;
- } else if (is_array($resp)) {
- if (isset($resp['object']) && is_string($resp['object']) && isset($types[$resp['object']]))
- $class = $types[$resp['object']];
- else
- $class = 'Stripe_Object';
- return Stripe_Object::scopedConstructFrom($class, $resp, $apiKey);
- } else {
- return $resp;
- }
- }
-}
diff --git a/mu-plugins/jquery.org/lib/Stripe/Util/Set.php b/mu-plugins/jquery.org/lib/Stripe/Util/Set.php
deleted file mode 100755
index e2654830..00000000
--- a/mu-plugins/jquery.org/lib/Stripe/Util/Set.php
+++ /dev/null
@@ -1,34 +0,0 @@
-_elts = array();
- foreach ($members as $item)
- $this->_elts[$item] = true;
- }
-
- public function includes($elt)
- {
- return isset($this->_elts[$elt]);
- }
-
- public function add($elt)
- {
- $this->_elts[$elt] = true;
- }
-
- public function discard($elt)
- {
- unset($this->_elts[$elt]);
- }
-
- // TODO: make Set support foreach
- public function toArray()
- {
- return array_keys($this->_elts);
- }
-}
diff --git a/mu-plugins/jquery.org/stripe.php b/mu-plugins/jquery.org/stripe.php
deleted file mode 100644
index 5441cd2c..00000000
--- a/mu-plugins/jquery.org/stripe.php
+++ /dev/null
@@ -1,140 +0,0 @@
- admin_url('admin-ajax.php'),
- 'action' => 'stripe_charge',
- 'nonce' => wp_create_nonce('stripe-nonce'),
- 'key' => STRIPE_PUBLIC
- ) );
- }
-
- public static function coupon() {
- require_once( 'lib/Stripe.php' );
- Stripe::setApiKey( STRIPE_SECRET );
-
- // Verify required data
- if ( empty( $_REQUEST[ 'coupon' ] ) ) {
- self::fail( 'Please enter a coupon code.');
- }
-
- try {
- $coupon = Stripe_Coupon::retrieve( $_REQUEST[ 'coupon' ] );
- } catch( Exception $e ) {
- self::fail( 'Invalid coupon id' );
- }
-
- echo json_encode(array(
- 'percent_off' => $coupon->percent_off,
- 'amount_off' => $coupon->amount_off
- ));
- exit();
- }
-
- public static function charge() {
- require_once( 'lib/Stripe.php' );
- Stripe::setApiKey( STRIPE_SECRET );
-
- // Verify required data
- if ( ! isset( $_REQUEST['nonce'] ) || ! wp_verify_nonce( $_REQUEST['nonce'], 'stripe-nonce' ) ) {
- self::fail( 'Invalid Nonce' );
- }
- if ( empty( $_REQUEST['email'] ) ) {
- self::fail( 'Looks like you forgot to provide us with your email, ' .
- 'please go back and make sure you provide it.' );
- }
- if ( empty( $_REQUEST['token'] ) ) {
- self::fail( 'It seems we didn\'t get your payment information, ' .
- 'please go back and try again.' );
- }
-
- $token = $_REQUEST['token'];
- $email = $_REQUEST['email'];
- $name = $_REQUEST['firstName'] . ' ' . $_REQUEST['lastName'];
- $plan = $_REQUEST['planId'];
- $address = $_REQUEST['address'];
- $coupon = empty( $_REQUEST['coupon'] ) ? null : $_REQUEST['coupon'];
-
- // Create Stripe subscription
- $customer = Stripe_Customer::create( array(
- 'email' => $email,
- 'card' => $token,
- 'description' => stripcslashes($name)
- ) );
- $subscription = array(
- 'plan' => $plan
- );
- if ( !empty( $coupon ) ) {
- $subscription['coupon'] = $coupon;
- }
- $charge = $customer->updateSubscription( $subscription );
- $stripeId = $customer->id;
-
- // Create or update WordPress user
- $user = get_user_by( 'email', $email );
- if ( $user ) {
- $user_id = $user->ID;
- } else {
- $user_id = wp_insert_user(array(
- 'user_pass' => wp_generate_password(),
- 'user_login' => $email,
- 'user_email' => $email,
- 'first_name' => $_REQUEST['firstName'],
- 'last_name' => $_REQUEST['lastName'],
- 'display_name' => $name
- ) );
- }
-
- // Store Stripe ID and gift choices on WordPress user
- $customerInfo = array(
- 'stripe_id' => $stripeId,
- 'address' => $address
- );
- if ( !empty( $_REQUEST[ 'tshirt' ] ) ) {
- $customerInfo[ 'tshirt' ] = $_REQUEST[ 'tshirt' ];
- }
- if ( !empty( $_REQUEST[ 'hoodie' ] ) ) {
- $customerInfo[ 'hoodie' ] = $_REQUEST[ 'hoodie' ];
- }
- if ( !empty( $_REQUEST[ 'bag' ] ) ) {
- $customerInfo[ 'bag' ] = $_REQUEST[ 'bag' ];
- }
- foreach( $customerInfo as $key => $value ) {
- add_user_meta( $user_id, $key, $value );
- }
-
- $mailBody = "$name ($email) has signed up for $plan.\n";
- $mailBody .= "WordPress user id: $user_id\n";
- if ( !empty( $coupon ) ) {
- $mailBody .= "coupon: $coupon\n";
- }
- foreach( $customerInfo as $key => $value ) {
- $mailBody .= "$key: $value\n";
- }
-
- mail( 'membership@jquery.org', "New Foundation Member ($name)", $mailBody );
-
- echo $user_id;
- exit();
- }
-
- public static function fail( $message ) {
- header( 'HTTP/1.0 400 Bad Request' );
- echo $message;
- exit();
- }
-}
-
-add_action( 'init', array( 'StripeForm', 'init' ) );
-add_action( 'wp_ajax_nopriv_stripe_charge', array( 'StripeForm', 'charge' ) );
-add_action( 'wp_ajax_stripe_charge', array( 'StripeForm', 'charge' ) );
-add_action( 'wp_ajax_nopriv_stripe_coupon', array( 'StripeForm', 'coupon' ) );
-add_action( 'wp_ajax_stripe_coupon', array( 'StripeForm', 'coupon' ) );
diff --git a/mu-plugins/plugins.jquery.com/posts.php b/mu-plugins/plugins.jquery.com/posts.php
deleted file mode 100644
index bb3ca22c..00000000
--- a/mu-plugins/plugins.jquery.com/posts.php
+++ /dev/null
@@ -1,91 +0,0 @@
- array(
- 'name' => __( 'jQuery Plugins' ),
- 'singular_name' => __( 'jQuery Plugin' )
- ),
- 'public' => true,
- 'map_meta_cap' => true,
- 'hierarchical' => true,
- 'taxonomies' => array( 'post_tag' ),
- 'rewrite' => false,
- 'query_var' => 'plugin',
- 'delete_with_user' => false,
- ) );
-}
-
-// Rewrite jquery_plugin posts to be at the root
-add_filter( 'post_type_link', function( $post_link, $post ) {
- if ( 'jquery_plugin' === $post->post_type ) {
- return user_trailingslashit( home_url( get_page_uri( $post ) ) );
- }
- return $post_link;
-}, 10, 2 );
-
-// Copy the page rewrite rules and have them catch plugins (after pages are checked).
-add_filter( 'page_rewrite_rules', function( $rules ) {
- foreach ( $rules as $rule => $match ) {
- if ( false === strpos( $rule, 'attachment/' ) )
- $rules[ str_replace( '.?.+?', '.*?.+?', $rule ) ] = str_replace( 'pagename=', 'plugin=', $match );
- }
- return $rules;
-} );
-
-// Only search against parent jquery_plugin posts
-function jquery_plugin_posts_only_for_searches( $query ) {
- if ( $query->is_main_query() && ($query->is_search() || $query->is_tag()) ) {
- $query->set( 'post_type', 'jquery_plugin' );
- $query->set( 'post_parent', 0 );
- $query->set( 'meta_key', 'watchers' );
- $query->set( 'orderby', 'meta_value_num' );
- $query->set( 'order', 'DESC' );
- }
-}
-
-add_action( 'init', 'post_type_jquery_plugin_init' );
-add_action( 'pre_get_posts', 'jquery_plugin_posts_only_for_searches' );
-add_filter( 'pre_option_permalink_structure', function() {
- return '/%postname%';
-} );
-
-/*
- * Ensure that the post_tag taxonomy uses our own special counting logic.
- *
- * Normally, this would simply be specified by register_taxonomy() with
- * the update_count_callback flag. Since we use the core tag taxonomy,
- * let's just continue to hijack it.
- */
-add_action( 'init', function() {
- $GLOBALS['wp_taxonomies']['post_tag']->update_count_callback = 'jquery_update_plugin_tag_count';
-} );
-
-/**
- * Mostly just _update_post_term_count(), tweaked for
- * post_type = 'jquery_plugin' and post_parent = 0.
- */
-function jquery_update_plugin_tag_count( $terms, $taxonomy ) {
- global $wpdb;
- foreach ( (array) $terms as $term ) {
- $count = (int) $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 = 'jquery_plugin' " .
- "AND post_parent = 0 AND term_taxonomy_id = %d",
- $term ) );
- do_action( 'edit_term_taxonomy', $term, $taxonomy );
- $wpdb->update( $wpdb->term_taxonomy, compact( 'count' ), array( 'term_taxonomy_id' => $term ) );
- do_action( 'edited_term_taxonomy', $term, $taxonomy );
- }
-}
diff --git a/mu-plugins/plugins.jquery.com/xmlrpc.php b/mu-plugins/plugins.jquery.com/xmlrpc.php
deleted file mode 100644
index 8be65846..00000000
--- a/mu-plugins/plugins.jquery.com/xmlrpc.php
+++ /dev/null
@@ -1,47 +0,0 @@
-escape( $args );
-
- // Authenticate
- $blog_id = $args[0];
- $username = $args[1];
- $password = $args[2];
-
- if ( ! $user = $wp_xmlrpc_server->login( $username, $password ) ) {
- return $wp_xmlrpc_server->error;
- }
-
- // Find post
- $plugin_name = $args[3];
- $query = new WP_Query( array(
- 'post_type' => 'jquery_plugin',
- 'name' => $plugin_name,
- 'update_post_term_cache' => false,
- 'update_post_meta_cache' => false,
- ));
-
- if ( empty( $query->posts ) ) {
- return null;
- }
-
- // Delegate to wp_getPost() for consistent return values
- return $wp_xmlrpc_server->wp_getPost(array(
- $blog_id,
- $username,
- $password,
- $query->posts[0]->ID
- ));
-}
-
-function jq_pjc_register_xmlrpc_methods( $methods ) {
- $methods[ 'jq-pjc.getPostForPlugin' ] = 'jq_pjc_get_post_for_plugin';
- return $methods;
-}
-
-add_filter( 'xmlrpc_methods', 'jq_pjc_register_xmlrpc_methods' );
diff --git a/object-cache-disabled.php b/object-cache-disabled.php
deleted file mode 100644
index 40854933..00000000
--- a/object-cache-disabled.php
+++ /dev/null
@@ -1,352 +0,0 @@
-object-cache.php file from your content directory.' );
-} elseif ( version_compare( '5.2.4', phpversion(), '>=' ) ) {
- wp_die( 'The APC object cache backend requires PHP 5.2 or higher. You are running ' . phpversion() . '. Please remove the object-cache.php
file from your content directory.' );
-}
-
-// Users with setups where multiple installs share a common wp-config.php can use this
-// to guarantee uniqueness for the keys generated by this object cache
-if ( !defined( 'WP_APC_KEY_SALT' ) )
- define( 'WP_APC_KEY_SALT', 'wp' );
-
-function wp_cache_add( $key, $data, $group = '', $expire = 0 ) {
- global $wp_object_cache;
-
- return $wp_object_cache->add( $key, $data, $group, $expire );
-}
-
-function wp_cache_incr( $key, $n = 1, $group = '' ) {
- global $wp_object_cache;
-
- return $wp_object_cache->incr2( $key, $n, $group );
-}
-
-function wp_cache_decr( $key, $n = 1, $group = '' ) {
- global $wp_object_cache;
-
- return $wp_object_cache->decr( $key, $n, $group );
-}
-
-function wp_cache_close() {
- return true;
-}
-
-function wp_cache_delete( $key, $group = '' ) {
- global $wp_object_cache;
-
- return $wp_object_cache->delete( $key, $group );
-}
-
-function wp_cache_flush() {
- global $wp_object_cache;
-
- return $wp_object_cache->flush();
-}
-
-function wp_cache_get( $key, $group = '', $force = false ) {
- global $wp_object_cache;
-
- return $wp_object_cache->get( $key, $group, $force );
-}
-
-function wp_cache_init() {
- global $wp_object_cache;
-
- $wp_object_cache = new APC_Object_Cache();
-}
-
-function wp_cache_replace( $key, $data, $group = '', $expire = 0 ) {
- global $wp_object_cache;
-
- return $wp_object_cache->replace( $key, $data, $group, $expire );
-}
-
-function wp_cache_set( $key, $data, $group = '', $expire = 0 ) {
- global $wp_object_cache;
-
- if ( defined('WP_INSTALLING') == false )
- return $wp_object_cache->set( $key, $data, $group, $expire );
- else
- return $wp_object_cache->delete( $key, $group );
-}
-
-function wp_cache_add_global_groups( $groups ) {
- global $wp_object_cache;
-
- $wp_object_cache->add_global_groups( $groups );
-}
-
-function wp_cache_add_non_persistent_groups( $groups ) {
- global $wp_object_cache;
-
- $wp_object_cache->add_non_persistent_groups( $groups );
-}
-
-class WP_Object_Cache {
- var $global_groups = array();
-
- var $no_mc_groups = array();
-
- var $cache = array();
- var $stats = array( 'get' => 0, 'delete' => 0, 'add' => 0 );
- var $group_ops = array();
-
- var $cache_enabled = true;
- var $default_expiration = 0;
- var $abspath = '';
- var $debug = false;
-
- function add( $id, $data, $group = 'default', $expire = 0 ) {
- $key = $this->key( $id, $group );
-
- if ( is_object( $data ) )
- $data = clone $data;
-
- $store_data = $data;
-
- if ( is_array( $data ) )
- $store_data = new ArrayObject( $data );
-
- if ( in_array( $group, $this->no_mc_groups ) ) {
- $this->cache[$key] = $data;
- return true;
- } elseif ( isset( $this->cache[$key] ) && $this->cache[$key] !== false ) {
- return false;
- }
-
- $expire = ( $expire == 0 ) ? $this->default_expiration : $expire;
-
- $result = apc_add( $key, $store_data, $expire );
- if ( false !== $result ) {
- @ ++$this->stats['add'];
- $this->group_ops[$group][] = "add $id";
- $this->cache[$key] = $data;
- }
-
- return $result;
- }
-
- function add_global_groups( $groups ) {
- if ( !is_array( $groups ) )
- $groups = (array) $groups;
-
- $this->global_groups = array_merge( $this->global_groups, $groups );
- $this->global_groups = array_unique( $this->global_groups );
- }
-
- function add_non_persistent_groups( $groups ) {
- if ( !is_array( $groups ) )
- $groups = (array) $groups;
-
- $this->no_mc_groups = array_merge( $this->no_mc_groups, $groups );
- $this->no_mc_groups = array_unique( $this->no_mc_groups );
- }
-
- // This is named incr2 because Batcache looks for incr
- // We will define that in a class extension if it is available (APC 3.1.1 or higher)
- function incr2( $id, $n = 1, $group = 'default' ) {
- $key = $this->key( $id, $group );
- if ( function_exists( 'apc_inc' ) )
- return apc_inc( $key, $n );
- else
- return false;
- }
-
- function decr( $id, $n = 1, $group = 'default' ) {
- $key = $this->key( $id, $group );
- if ( function_exists( 'apc_dec' ) )
- return apc_dec( $id, $n );
- else
- return false;
- }
-
- function close() {
- return true;
- }
-
- function delete( $id, $group = 'default' ) {
- $key = $this->key( $id, $group );
-
- if ( in_array( $group, $this->no_mc_groups ) ) {
- unset( $this->cache[$key] );
- return true;
- }
-
- $result = apc_delete( $key );
-
- @ ++$this->stats['delete'];
- $this->group_ops[$group][] = "delete $id";
-
- if ( false !== $result )
- unset( $this->cache[$key] );
-
- return $result;
- }
-
- function flush() {
- // Don't flush if multi-blog.
- if ( function_exists( 'is_site_admin' ) || defined( 'CUSTOM_USER_TABLE' ) && defined( 'CUSTOM_USER_META_TABLE' ) )
- return true;
-
- return apc_clear_cache( 'user' );
- }
-
- function get($id, $group = 'default', $force = false) {
- $key = $this->key($id, $group);
-
- if ( isset($this->cache[$key]) && ( !$force || in_array($group, $this->no_mc_groups) ) ) {
- if ( is_object( $this->cache[$key] ) )
- $value = clone $this->cache[$key];
- else
- $value = $this->cache[$key];
- } else if ( in_array($group, $this->no_mc_groups) ) {
- $this->cache[$key] = $value = false;
- } else {
- $value = apc_fetch( $key );
- if ( is_object( $value ) && 'ArrayObject' == get_class( $value ) )
- $value = $value->getArrayCopy();
- if ( NULL === $value )
- $value = false;
- $this->cache[$key] = $value;
- }
-
- @ ++$this->stats['get'];
- $this->group_ops[$group][] = "get $id";
-
- if ( 'checkthedatabaseplease' === $value ) {
- unset( $this->cache[$key] );
- $value = false;
- }
-
- return $value;
- }
-
- function key( $key, $group ) {
- if ( empty( $group ) )
- $group = 'default';
-
- if ( false !== array_search( $group, $this->global_groups ) )
- $prefix = $this->global_prefix;
- else
- $prefix = $this->blog_prefix;
-
- return WP_APC_KEY_SALT . ':' . $this->abspath . ":$prefix$group:$key";
- }
-
- function replace( $id, $data, $group = 'default', $expire = 0 ) {
- return $this->set( $id, $data, $group, $expire );
- }
-
- function set( $id, $data, $group = 'default', $expire = 0 ) {
- $key = $this->key( $id, $group );
- if ( isset( $this->cache[$key] ) && ('checkthedatabaseplease' === $this->cache[$key] ) )
- return false;
-
- if ( is_object( $data ) )
- $data = clone $data;
-
- $store_data = $data;
-
- if ( is_array( $data ) )
- $store_data = new ArrayObject( $data );
-
- $this->cache[$key] = $data;
-
- if ( in_array( $group, $this->no_mc_groups ) )
- return true;
-
- $expire = ( $expire == 0 ) ? $this->default_expiration : $expire;
- $result = apc_store( $key, $store_data, $expire );
-
- return $result;
- }
-
- function colorize_debug_line( $line ) {
- $colors = array(
- 'get' => 'green',
- 'set' => 'purple',
- 'add' => 'blue',
- 'delete' => 'red');
-
- $cmd = substr( $line, 0, strpos( $line, ' ' ) );
-
- $cmd2 = "$cmd ";
-
- return $cmd2 . substr( $line, strlen( $cmd ) ) . "\n";
- }
-
- function stats() {
- echo "\n";
- foreach ( $this->stats as $stat => $n ) {
- echo "$stat $n";
- echo " \n";
- }
- echo "
\n";
- echo "APC: ";
- foreach ( $this->group_ops as $group => $ops ) {
- if ( !isset( $_GET['debug_queries'] ) && 500 < count( $ops ) ) {
- $ops = array_slice( $ops, 0, 500 );
- echo "Too many to show! Show them anyway . \n";
- }
- echo "$group commands ";
- echo "\n";
- $lines = array();
- foreach ( $ops as $op ) {
- $lines[] = $this->colorize_debug_line($op);
- }
- print_r($lines);
- echo " \n";
- }
- if ( $this->debug ) {
- $apc_info = apc_cache_info();
- echo "";
- echo "Cache Hits: {$apc_info['num_hits']} \n";
- echo "Cache Misses: {$apc_info['num_misses']}\n";
- echo "
\n";
- }
- }
-
- function WP_Object_Cache() {
- $this->abspath = md5( ABSPATH );
-
- global $blog_id, $table_prefix;
- $this->global_prefix = '';
- $this->blog_prefix = '';
- if ( function_exists( 'is_multisite' ) ) {
- $this->global_prefix = ( is_multisite() || defined('CUSTOM_USER_TABLE') && defined('CUSTOM_USER_META_TABLE') ) ? '' : $table_prefix;
- $this->blog_prefix = ( is_multisite() ? $blog_id : $table_prefix ) . ':';
- }
-
- $this->cache_hits =& $this->stats['get'];
- $this->cache_misses =& $this->stats['add'];
- }
-}
-
-if ( function_exists( 'apc_inc' ) ) {
- class APC_Object_Cache extends WP_Object_Cache {
- function incr( $id, $n = 1, $group = 'default' ) {
- return parent::incr2( $id, $n, $group );
- }
- }
-} else {
- class APC_Object_Cache extends WP_Object_Cache {
- // Blank
- }
-}
diff --git a/package.json b/package.json
deleted file mode 100644
index ee4631b5..00000000
--- a/package.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "version": "4.2.0"
-}
diff --git a/plugins/allow-numeric-stubs/allow-numeric-stubs.php b/plugins/allow-numeric-stubs/allow-numeric-stubs.php
deleted file mode 100644
index 225946b0..00000000
--- a/plugins/allow-numeric-stubs/allow-numeric-stubs.php
+++ /dev/null
@@ -1,130 +0,0 @@
-<!--nextpage--> ability in Pages to accomplish it.
-Version: 2.1.0
-Author: Viper007Bond
-Author URI: http://www.viper007bond.com/
-
-**************************************************************************
-
-Copyright (C) 2008-2010 Viper007Bond
-
-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 .
-
-**************************************************************************/
-
-class Allow_Numeric_Stubs {
-
- function allow_numeric_stubs() {
- register_activation_hook( __FILE__, array( &$this, 'flush_rewrite_rules' ) );
-
- add_filter( 'page_rewrite_rules', array( &$this, 'page_rewrite_rules' ) );
-
- add_action( 'save_post', array( &$this, 'maybe_fix_stub' ), 2, 2 );
- add_filter( 'editable_slug', array( &$this, 'maybe_fix_editable_slug' ) );
- }
-
-
- // Force a flush of the rewrite rules (for when this plugin is activated)
- function flush_rewrite_rules() {
- global $wp_rewrite;
- $wp_rewrite->flush_rules();
- }
-
-
- // Remove the rewrite rule that "breaks" it (paged content) and replace it with one that allows numeric stubs
- function page_rewrite_rules( $rules ) {
- unset( $rules['(.?.+?)(/[0-9]+)?/?$'] );
-
- $rules['(.?.+?)?/?$'] = 'index.php?pagename=$matches[1]';
-
- return $rules;
- }
-
-
- // WordPress will add "-2" to numeric stubs as they aren't normally allowed.
- // Undo that for numeric page slugs when the post is saved.
- function maybe_fix_stub( $post_ID, $post ) {
-
- // Pages only
- if ( 'page' != $post->post_type )
- return;
-
- // Only mess with numeric stubs or stubs that are 12345-2
- if ( ! is_numeric( $post->post_name ) && $post->post_name == $this->maybe_unsuffix_slug( $post->post_name ) )
- return;
-
- // Infinite loops are bad
- remove_action( 'save_post', array( &$this, 'maybe_fix_stub' ), 2, 2 );
-
- // Update the post with a filter active that'll fix the slug back to what it was supposed to be
- add_filter( 'wp_insert_post_data', array(&$this, 'slug_fixer'), 10, 2 );
- wp_update_post( $post );
- remove_filter( 'wp_insert_post_data', array(&$this, 'slug_fixer'), 10, 2 );
-
- // Put this filter back incase any other posts are updated on this pageload
- add_action( 'save_post', array( &$this, 'maybe_fix_stub' ), 2, 2 );
- }
-
-
- // Ensure that post_name stays as we pass it as wp_unique_post_slug() will try and add a "-2" to the end of it
- function slug_fixer( $data, $postarr ) {
- // $data['post_name'] = $postarr['post_name']; // Not sure why this isn't working
-
- $data['post_name'] = $this->maybe_unsuffix_slug( $postarr['post_name'] );
-
- return $data;
- }
-
-
- // Re-fix the page slug for the editable URL
- function maybe_fix_editable_slug( $slug ) {
- global $post;
-
- if ( empty( $post ) )
- $thispost = get_post( $_POST['post_id'] );
- else
- $thispost = $post;
-
- if ( empty( $thispost->post_type ) )
- return $slug;
-
- if ( 'page' == $thispost->post_type )
- $slug = $this->maybe_unsuffix_slug( $slug );
-
- return $slug;
- }
-
-
- // Checks to see if a string is numeric with "-2" on the end of it
- // If so, it returns the original numeric string
- function maybe_unsuffix_slug( $slug ) {
- if ( '-2' == substr( $slug, -2 ) ) {
- $nonsuffixslug = substr( $slug, 0, -2 );
-
- if ( is_numeric( $nonsuffixslug ) )
- $slug = $nonsuffixslug;
- }
-
- return $slug;
- }
-}
-
-$Allow_Numeric_Stubs = new Allow_Numeric_Stubs();
-
-?>
\ No newline at end of file
diff --git a/plugins/allow-numeric-stubs/readme.txt b/plugins/allow-numeric-stubs/readme.txt
deleted file mode 100644
index 3f105268..00000000
--- a/plugins/allow-numeric-stubs/readme.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-=== Allow Numeric Stubs ===
-Contributors: Viper007Bond
-Donate link: http://www.viper007bond.com/donate/
-Tags: page, pages, numeric, number
-Requires at least: 3.3
-Tested up to: 3.3
-Stable tag: trunk
-
-Allows Pages to have a stub that is only a number. Sacrifices the paged content ability in Pages to accomplish it.
-
-== Description ==
-
-It is not possible to have a page slug (the page's name in the URL) that is a number. For example this will not work: `yoursite.com/about/2/`. That URL conflicts with paged content feature where you can posts and pages with multiple pages of content by adding `` within your content.
-
-This plugin allows you to have Pages with numbers as stubs by giving up the ability to have paged content pages which isn't a big deal as most people don't use paged content pages anyway.
-
-== Installation ==
-
-###Updgrading From A Previous Version###
-
-To upgrade from a previous version of this plugin, delete the entire folder and files from the previous version of the plugin and then follow the installation instructions below.
-
-###Installing The Plugin###
-
-Go to your WordPress administration area and then navigate to Plugins -> Add New in the menu. Search for this plugin's name and then press the install link.
-
-= See Also:** ["Installing Plugins" article on the WP Codex](http://codex.wordpress.org/Managing_Plugins#Installing_Plugins)
-
-== ChangeLog ==
-
-= Version 2.1.0 =
-
-* Update for WordPress 3.3 and it's newer rewrite rules.
-
-= Version 2.0.1 =
-
-* Re-add the `save_post` filter after fixing the slug incase multiple posts are updated in one pageload.
-
-= Version 2.0.0 =
-
-* Recoded for WordPress 3.0+. WordPress now won't let you manually enter a numeric stub -- it will prefix "-2" onto the end of it so that the page is viewable. This new plugin version works around it.
-
-= Version 1.0.0 =
-
-* Initial release.
-
-== Upgrade Notice ==
-
-= 2.1.0 =
-WordPress 3.3 compatibility.
\ No newline at end of file
diff --git a/plugins/disable-emojis/composer.json b/plugins/disable-emojis/composer.json
new file mode 100644
index 00000000..a7ced755
--- /dev/null
+++ b/plugins/disable-emojis/composer.json
@@ -0,0 +1,12 @@
+{
+ "name": "ryanhellyer/disable-emojiis",
+ "description": "WordPress plugin which disables the WordPress emoji functionality. GDPR friendly.",
+ "type": "wordpress-plugin",
+ "license": "GPL-2.0",
+ "authors": [
+ {
+ "name": "ryanhellyer"
+ }
+ ],
+ "require": {}
+}
diff --git a/plugins/disable-emojis/disable-emojis.php b/plugins/disable-emojis/disable-emojis.php
new file mode 100644
index 00000000..fed54201
--- /dev/null
+++ b/plugins/disable-emojis/disable-emojis.php
@@ -0,0 +1,83 @@
+ $url ) {
+ if ( strpos( $url, $emoji_svg_url_bit ) !== false ) {
+ unset( $urls[$key] );
+ }
+ }
+
+ }
+
+ return $urls;
+}
diff --git a/themes/jquery/license.txt b/plugins/disable-emojis/license.txt
old mode 100755
new mode 100644
similarity index 100%
rename from themes/jquery/license.txt
rename to plugins/disable-emojis/license.txt
diff --git a/plugins/disable-emojis/readme.txt b/plugins/disable-emojis/readme.txt
new file mode 100644
index 00000000..d3dd881d
--- /dev/null
+++ b/plugins/disable-emojis/readme.txt
@@ -0,0 +1,93 @@
+=== Disable Emojis (GDPR friendly) ===
+Contributors: ryanhellyer
+Tags: emojis, gdpr, disable
+Donate link: https://geek.hellyer.kiwi/donate/
+Requires at least: 4.8
+Tested up to: 6.8
+Stable tag: 1.7.7
+
+
+This plugin disables the new WordPress emoji functionality. GDPR friendly.
+
+
+== Description ==
+
+This plugin disables the new WordPress emoji functionality. GDPR friendly.
+
+
+Note: Emoticons will still work and emojis will still work in browsers which have built in support for them. This plugin simply removes the extra code bloat used to add support for emojis in older browsers.
+
+= GDPR compliancy =
+
+This plugin does not do anything to make your site less GDPR compliant. It disables the DNS prefetching of emojis within WordPress, which should ensure improved privacy. To determine if your site is GDPR compliant, please seek legal advice. I have done my best to ensure the plugin is 100% GDPR compliant, but I am not a lawyer so can not guarantee anything ;)
+
+
+== Installation ==
+
+After you've downloaded and extracted the files:
+
+1. Upload the complete 'disable-emojis' folder to the '/wp-content/plugins/' directory OR install via the plugin installer
+2. Activate the plugin through the 'Plugins' menu in WordPress
+3. And yer done!
+
+Visit the Disable Emojis plugin for more information.
+
+
+== Changelog ==
+
+= 1.7.7 =
+* Confirmed support for newer WordPress versions.
+
+= 1.7.6 =
+* Confirmed support for newer WordPress versions.
+
+= 1.7.5 =
+* Added Composer support.
+
+= 1.7.4 =
+* Fixing typos.
+
+= 1.7.3 =
+* Unneeded version bump to shut the WordPress.org notice up.
+
+= 1.7.2 =
+* Subtle improvement to code cleanliness.
+* Improved documentation regarding GDPR issues.
+
+= 1.7.1 =
+* Added GDPR friendly label on advice from Ipstenu.
+
+= 1.7 =
+* Removed DNS prefetch URL again.
+* This time using simple string check rather than relying on internal WordPress filters.
+
+= 1.6 =
+* Removed DNS prefetch URL. Props to Aaron Queen for assisting with this.
+
+= 1.5.3 =
+* Catering to new DNS prefetch URL in version 4.7 of core
+
+= 1.5.2 =
+* Improved documentation.
+* Removed redundant dns prefetching. Thanks to Milan Dinic for the pull request.
+
+= 1.5.1 =
+* Updating documentation.
+
+= 1.5 =
+* Catering for invalid $plugin array.
+
+= 1.4 =
+* Updating to use Otto's code.
+
+= 1.3 =
+Removing extraneous styles.
+
+= 1.2 =
+Bug fix.
+
+= 1.1 =
+Updating to work with latest beta.
+
+= 1.0 =
+Initial release.
diff --git a/plugins/gilded-wordpress/LICENSE.txt b/plugins/gilded-wordpress/LICENSE.txt
new file mode 100644
index 00000000..7e37c759
--- /dev/null
+++ b/plugins/gilded-wordpress/LICENSE.txt
@@ -0,0 +1,22 @@
+Copyright Scott González http://scottgonzalez.com
+
+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/mu-plugins/gilded-wordpress.php b/plugins/gilded-wordpress/gilded-wordpress.php
similarity index 99%
rename from mu-plugins/gilded-wordpress.php
rename to plugins/gilded-wordpress/gilded-wordpress.php
index 413b530c..7a8ba247 100644
--- a/mu-plugins/gilded-wordpress.php
+++ b/plugins/gilded-wordpress/gilded-wordpress.php
@@ -4,7 +4,7 @@
* Description: Adds custom XML-RPC methods for use with Gilded WordPress.
*/
-define( 'GW_VERSION', '1.0.0' );
+define( 'GW_VERSION', '1.0.7' );
if ( ! defined( 'GW_RESOURCE_DIR' ) )
define( 'GW_RESOURCE_DIR', gw_resources_dir( home_url() ) );
diff --git a/plugins/index.php b/plugins/index.php
old mode 100755
new mode 100644
index 4e6c07c7..62200328
--- a/plugins/index.php
+++ b/plugins/index.php
@@ -1,3 +1,2 @@
\ No newline at end of file
diff --git a/plugins/jquery-actions.php b/plugins/jquery-actions.php
new file mode 100644
index 00000000..b1869e37
--- /dev/null
+++ b/plugins/jquery-actions.php
@@ -0,0 +1,57 @@
+ and sitemap output.
+$jq_proto = $_SERVER['HTTP_X_FORWARDED_PROTO'] ?? '';
+if ( $jq_proto == 'https' ) {
+ $_SERVER['HTTPS'] = '1';
+} elseif ( $jq_proto == 'http' ) {
+ $_SERVER['HTTPS'] = '0';
+}
+unset( $jq_proto );
+
+add_filter( 'wp_headers', function ( $headers ) {
+ if ( isset( $headers['Vary'] ) ) {
+ $headers['Vary'] .= ',X-Forwarded-Proto';
+ } else {
+ $headers['Vary'] = 'X-Forwarded-Proto';
+ }
+ return $headers;
+}, 10, 1 );
+
+/**
+ * Add rel=me link to HTML head for Mastodon domain verification
+ *
+ * Usage:
+ *
+ * Put one or more comma-separated URLs in the 'jquery_xfn_rel_me' WordPress option.
+ *
+ * Example:
+ *
+ * 'jquery_xfn_rel_me' => 'https://example.org/@foo,https://social.example/@bar'
+ *
+ * See also:
+ *
+ * - https://docs.joinmastodon.org/user/profile/#verification
+ * - https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/me
+ * - https://microformats.org/wiki/rel-me
+ * - https://gmpg.org/xfn/
+ */
+function jquery_xfnrelme_wp_head() {
+ $option = get_option( 'jquery_xfn_rel_me' , '' );
+ $links = $option !== '' ? explode( ',', $option ) : array();
+ foreach ( $links as $url ) {
+ // We use esc_attr instead of esc_url, as the latter would shorten
+ // the URL to be scheme-less as "//example" instead of "https://example",
+ // which prevents relation verification.
+ echo ' ' . "\n";
+ }
+}
+
+add_action('wp_head', 'jquery_xfnrelme_wp_head');
diff --git a/mu-plugins/api-sites/category-listings.php b/plugins/jquery-api-category-listing.php
similarity index 78%
rename from mu-plugins/api-sites/category-listings.php
rename to plugins/jquery-api-category-listing.php
index cd514f6e..4d737b04 100644
--- a/mu-plugins/api-sites/category-listings.php
+++ b/plugins/jquery-api-category-listing.php
@@ -1,4 +1,8 @@
$value ) {
+ // Skip these on live sites (both production and staging),
+ // where they are managed by puppet.
+ // Local testing with a fresh database does not
+ // currently work if these are skipped.
+ if ( JQUERY_STAGING !== 'local' ) {
+ if ( $option === 'stylesheet' || $option === 'template' ) {
+ // Don't mess with themes for now.
+ continue;
+ }
+ if ( $option === 'active_plugins' ) {
+ // On live sites (including staging ones),
+ // Puppet manages activation of per-site plugins.
+ continue;
+ }
+ }
+ add_filter( 'pre_option_' . $option, function () use ( $value ) {
+ return $value;
+ } );
+}
+unset( $sites, $options, $option );
+
+// Ensure that the local port is used for template assets, if it exists.
+add_filter( 'theme_root_uri', function( $value ) {
+ // All environment variables are set either in the local wp-config.php or via puppet.
+ // Staging sites set JQUERY_STAGING to the boolean `true` instead of 'local'.
+ // Production sites set it to false.
+ if ( JQUERY_STAGING === 'local' ) {
+ // Don't specify http vs https here, as the site may be accessed via either.
+ $siteurl = '//' . strtr( JQUERY_STAGING_FORMAT, [ '%s' => JQUERY_LIVE_SITE ] );
+ $value = $siteurl . '/wp-content/themes';
+ }
+ return $value;
+});
+
+// Remove misc links from on non-blog sites
+if ( !get_option( 'jquery_is_blog' ) ) {
+ remove_action( 'wp_head', 'feed_links', 2 );
+ remove_action( 'wp_head', 'feed_links_extra', 3 );
+ remove_action( 'wp_head', 'rsd_link' );
+ remove_action( 'wp_head', 'wlwmanifest_link' );
+ remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );
+
+ // Remove shortlink and header.
+ remove_action( 'wp_head', 'wp_shortlink_wp_head', 10 );
+ remove_action( 'template_redirect', 'wp_shortlink_header', 11 );
+
+ // Disable WordPress auto-paragraphing for posts, except on actual blog sites
+ remove_filter( 'the_content', 'wpautop' );
+
+ add_filter( 'option_uploads_use_yearmonth_folders', '__return_false' );
+
+ add_filter( 'upload_dir', function( $upload_dir ) {
+ if ( defined( 'UPLOADS' ) ) {
+ $upload_dir['path'] = $upload_dir['basedir'] = UPLOADS;
+ } else {
+ $upload_dir['path'] = $upload_dir['basedir'] = WP_CONTENT_DIR . '/uploads';
+ }
+
+ return $upload_dir;
+ });
+}
+
+/**
+ * Content Security Policy
+ * https://github.com/jquery/infrastructure-puppet/issues/54
+ */
+add_action( 'send_headers', function() {
+ $nonce = bin2hex( random_bytes( 8 ) );
+ $report_url = 'https://csp-report-api.openjs-foundation.workers.dev/';
+ $policy = array(
+ 'default-src' => "'self'",
+ 'script-src' => "'self' 'nonce-$nonce' code.jquery.com",
+ // The nonce is here so inline scripts can be used in the theme
+ 'style-src' => "'self' 'nonce-$nonce' code.jquery.com",
+ // Allow style="" attributes in blog posts and markdown.
+ 'style-src-attr' => "'unsafe-inline'",
+ // data: SVG images are used in typesense
+ // Allow gravatars in wordpress admins
+ 'img-src' => "'self' data: secure.gravatar.com code.jquery.com",
+ 'connect-src' => "'self' typesense.jquery.com",
+ // Allow data fonts for the wordpress admins
+ 'font-src' => "'self' data:",
+ 'object-src' => "'none'",
+ 'frame-ancestors' => "'none'",
+ 'base-uri' => "'self'",
+ 'block-all-mixed-content' => '',
+ 'report-to' => 'csp-endpoint',
+ // Add report-uri for Firefox, which
+ // does not yet support report-to
+ 'report-uri' => $report_url,
+ );
+
+ $policy = apply_filters( 'jq_content_security_policy', $policy );
+
+ if ( is_admin() ) {
+ // wp-admin (as used by blogs) requires inline scripts, inline styles,
+ // and workers from blob: URLs
+ $policy[ 'script-src' ] = "'self' 'unsafe-inline' blob: code.jquery.com";
+ $policy[ 'style-src' ] = "'self' 'unsafe-inline' code.jquery.com";
+ }
+
+ $policy_string = '';
+ foreach ( $policy as $key => $value ) {
+ $policy_string .= $key . ' ' . $value . '; ';
+ }
+
+ header( 'Reporting-Endpoints: csp-endpoint="' . $report_url . '"' );
+ header( 'Content-Security-Policy: ' . $policy_string );
+} );
+
+// Disable WordPress text transformations (smart quotes, etc.) for posts.
+remove_filter( 'the_content', 'wptexturize' );
+
+// Disable more restrictive multisite upload settings.
+remove_filter( 'upload_mimes', 'check_upload_mimes' );
+// Give unfiltered upload ability to super admins.
+define( 'ALLOW_UNFILTERED_UPLOADS', true );
+// Until unfiltered uploads make it into XML-RPC:
+add_filter( 'upload_mimes', function( $mimes ) {
+ $mimes['eot'] = 'application/vnd.ms-fontobject';
+ $mimes['svg'] = 'image/svg+xml';
+ $mimes['ttf'] = 'application/x-font-ttf';
+ $mimes['woff'] = 'application/font-woff';
+ $mimes['xml'] = 'text/xml';
+ $mimes['php'] = 'application/x-php';
+ $mimes['json'] = 'application/json';
+ return $mimes;
+} );
+
+// Increase file size limit to 1GB
+add_filter( 'pre_site_option_fileupload_maxk', function() {
+ return 1024 * 1024;
+} );
+
+// Disable the new image sizes feature.
+// It adds a style tag that would require a CSP exception.
+add_filter( 'wp_img_tag_add_auto_sizes', '__return_false' );
+
+// Allow full HTML in term descriptions.
+add_action( 'init', 'jquery_unfiltered_html_for_term_descriptions' );
+add_action( 'set_current_user', 'jquery_unfiltered_html_for_term_descriptions' );
+function jquery_unfiltered_html_for_term_descriptions() {
+ remove_filter( 'pre_term_description', 'wp_filter_kses' );
+ remove_filter( 'pre_term_description', 'wp_filter_post_kses' );
+ if ( ! current_user_can( 'unfiltered_html' ) )
+ add_filter( 'pre_term_description', 'wp_filter_post_kses' );
+}
+
+// Bypass multisite checks.
+add_filter( 'ms_site_check', '__return_true' );
+
+// Add body classes found in postmeta.
+add_filter( 'body_class', function( $classes ) {
+ $body_class_setting = get_option( 'jquery_body_class' );
+ if ( $body_class_setting ) {
+ array_unshift( $classes, $body_class_setting );
+ }
+ if ( strpos( JQUERY_LIVE_SITE, 'api.' ) === 0 ) {
+ array_unshift( $classes, 'api' );
+ }
+
+ if ( is_page() ) {
+ $classes[] = 'page-slug-' . sanitize_html_class( strtolower( get_queried_object()->post_name ) );
+ }
+ if ( is_singular() && $post_classes = get_post_meta( get_queried_object_id(), 'body_class', true ) ) {
+ $classes = array_merge( $classes, explode( ' ', $post_classes ) );
+ }
+ if ( is_archive() || is_search() ) {
+ $classes[] = 'listing';
+ }
+
+ return $classes;
+});
+
+add_filter( 'get_terms', function( $terms, $taxonomies, $args ) {
+ if ( !isset( $args[ 'orderby' ] ) || $args[ 'orderby' ] !== 'natural' ) {
+ return $terms;
+ }
+
+ $sortedTerms = array();
+ foreach( $terms as $term ) {
+ $sortedTerms[ $term->name ] = $term;
+ }
+ uksort( $sortedTerms, 'strnatcasecmp' );
+
+ if ( strtolower( $args[ 'order' ] ) === 'desc' ) {
+ $sortedTerms = array_reverse( $sortedTerms );
+ }
+
+ return $sortedTerms;
+}, 20, 3 );
+
+add_filter( 'xmlrpc_wp_insert_post_data', function ( $post_data, $content_struct ) {
+ if ( $post_data['post_type'] !== 'page' ) {
+ return $post_data;
+ }
+
+ if ( isset( $content_struct['page_template'] ) ) {
+ $post_data['page_template'] = $content_struct['page_template'];
+ }
+
+ if ( isset( $content_struct['menu_order'] ) ) {
+ $post_data['menu_order'] = $content_struct['menu_order'];
+ }
+
+ return $post_data;
+}, 10, 2 );
+
+if ( JQUERY_STAGING && !defined( 'XMLRPC_REQUEST' ) ) {
+ ob_start( 'jquery_com_ob_local_urls' );
+}
+function jquery_com_ob_local_urls( $content ) {
+ $pairs = [];
+ foreach ( jquery_sites() as $site => $_ ) {
+ // Replace HTTPS with protocol-relative so navigation stays within HTTP locally.
+ $pairs[ 'https://' . $site ] = '//' . jquery_site_expand( $site );
+ // Update any remaining HTTP or protocol-relative urls.
+ $pairs[ '//' . $site ] = '//' . jquery_site_expand( $site );
+ }
+ return strtr( $content, $pairs );
+}
diff --git a/mu-plugins/jquery-tags-on-pages.php b/plugins/jquery-tags-on-pages.php
similarity index 100%
rename from mu-plugins/jquery-tags-on-pages.php
rename to plugins/jquery-tags-on-pages.php
diff --git a/plugins/memcached/LICENSE b/plugins/memcached/LICENSE
new file mode 100644
index 00000000..4e41786d
--- /dev/null
+++ b/plugins/memcached/LICENSE
@@ -0,0 +1,348 @@
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+ 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.
+
+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/plugins/memcached/object-cache.php b/plugins/memcached/object-cache.php
new file mode 100644
index 00000000..b8c645eb
--- /dev/null
+++ b/plugins/memcached/object-cache.php
@@ -0,0 +1,1208 @@
+add( $key, $data, $group, $expire );
+}
+
+function wp_cache_add_multiple( array $data, $group = '', $expire = 0 ) {
+ global $wp_object_cache;
+
+ return $wp_object_cache->add_multiple( $data, $group, $expire );
+}
+
+function wp_cache_incr( $key, $n = 1, $group = '' ) {
+ global $wp_object_cache;
+
+ return $wp_object_cache->incr( $key, $n, $group );
+}
+
+function wp_cache_decr( $key, $n = 1, $group = '' ) {
+ global $wp_object_cache;
+
+ return $wp_object_cache->decr( $key, $n, $group );
+}
+
+function wp_cache_close() {
+ global $wp_object_cache;
+
+ return $wp_object_cache->close();
+}
+
+function wp_cache_delete( $key, $group = '' ) {
+ global $wp_object_cache;
+
+ return $wp_object_cache->delete( $key, $group );
+}
+
+function wp_cache_delete_multiple( array $keys, $group = '' ) {
+ global $wp_object_cache;
+
+ return $wp_object_cache->delete_multiple( $keys, $group );
+}
+
+function wp_cache_flush() {
+ global $wp_object_cache;
+
+ return $wp_object_cache->flush();
+}
+
+function wp_cache_flush_runtime() {
+ global $wp_object_cache;
+
+ return $wp_object_cache->flush_runtime();
+}
+
+function wp_cache_get( $key, $group = '', $force = false, &$found = null ) {
+ global $wp_object_cache;
+
+ $value = apply_filters( 'pre_wp_cache_get', false, $key, $group, $force );
+ if ( false !== $value ) {
+ $found = true;
+ return $value;
+ }
+
+ return $wp_object_cache->get( $key, $group, $force, $found );
+}
+
+function wp_cache_get_multiple( $keys, $group = '', $force = false ) {
+ global $wp_object_cache;
+
+ return $wp_object_cache->get_multiple( $keys, $group, $force );
+}
+
+/**
+ * Retrieve multiple cache entries
+ *
+ * @param array $groups Array of arrays, of groups and keys to retrieve
+ * @return mixed
+ */
+function wp_cache_get_multi( $groups ) {
+ global $wp_object_cache;
+
+ return $wp_object_cache->get_multi( $groups );
+}
+
+function wp_cache_init() {
+ global $wp_object_cache;
+
+ $wp_object_cache = new WP_Object_Cache();
+}
+
+function wp_cache_replace( $key, $data, $group = '', $expire = 0 ) {
+ global $wp_object_cache;
+
+ return $wp_object_cache->replace( $key, $data, $group, $expire );
+}
+
+function wp_cache_set( $key, $data, $group = '', $expire = 0 ) {
+ global $wp_object_cache;
+
+ if ( defined( 'WP_INSTALLING' ) === false ) {
+ return $wp_object_cache->set( $key, $data, $group, $expire );
+ } else {
+ return $wp_object_cache->delete( $key, $group );
+ }
+}
+
+function wp_cache_set_multiple( array $data, $group = '', $expire = 0 ) {
+ global $wp_object_cache;
+
+ return $wp_object_cache->set_multiple( $data, $group, $expire );
+}
+
+function wp_cache_switch_to_blog( $blog_id ) {
+ global $wp_object_cache;
+
+ return $wp_object_cache->switch_to_blog( $blog_id );
+}
+
+function wp_cache_add_global_groups( $groups ) {
+ global $wp_object_cache;
+
+ $wp_object_cache->add_global_groups( $groups );
+}
+
+function wp_cache_add_non_persistent_groups( $groups ) {
+ global $wp_object_cache;
+
+ $wp_object_cache->add_non_persistent_groups( $groups );
+}
+
+/**
+ * Determines whether the object cache implementation supports a particular feature.
+ *
+ * @param string $feature Name of the feature to check for. Possible values include:
+ * 'add_multiple', 'set_multiple', 'get_multiple', 'delete_multiple',
+ * 'flush_runtime', 'flush_group'.
+ * @return bool True if the feature is supported, false otherwise.
+ */
+function wp_cache_supports( $feature ) {
+ switch ( $feature ) {
+ case 'get_multiple':
+ case 'flush_runtime':
+ return true;
+
+ default:
+ return false;
+ }
+}
+
+class WP_Object_Cache {
+ var $global_groups = array( 'WP_Object_Cache_global' );
+
+ var $no_mc_groups = array();
+
+ var $cache = array();
+ /** @var Memcache[] */
+ var $mc = array();
+ var $default_mcs = array();
+ var $stats = array(
+ 'get' => 0,
+ 'get_local' => 0,
+ 'get_multi' => 0,
+ 'set' => 0,
+ 'set_local' => 0,
+ 'add' => 0,
+ 'delete' => 0,
+ 'delete_local' => 0,
+ 'slow-ops' => 0,
+ );
+ var $group_ops = array();
+ var $cache_hits = 0;
+ var $cache_misses = 0;
+ var $global_prefix = '';
+ var $blog_prefix = '';
+ var $key_salt = '';
+
+ var $flush_group = 'WP_Object_Cache';
+ var $global_flush_group = 'WP_Object_Cache_global';
+ var $flush_key = "flush_number_v4";
+ var $old_flush_key = "flush_number";
+ var $flush_number = array();
+ var $global_flush_number = null;
+
+ var $cache_enabled = true;
+ var $default_expiration = 0;
+ var $max_expiration = 2592000; // 30 days
+
+ var $stats_callback = null;
+
+ var $connection_errors = array();
+
+ var $time_start = 0;
+ var $time_total = 0;
+ var $size_total = 0;
+ var $slow_op_microseconds = 0.005; // 5 ms
+
+ function add( $id, $data, $group = 'default', $expire = 0 ) {
+ $key = $this->key( $id, $group );
+
+ if ( is_object( $data ) ) {
+ $data = clone $data;
+ }
+
+ if ( in_array( $group, $this->no_mc_groups ) ) {
+ if ( ! isset( $this->cache[ $key ] ) ) {
+ $this->cache[ $key ] = [
+ 'value' => $data,
+ 'found' => false,
+ ];
+
+ return true;
+ }
+
+ return false;
+ }
+
+ if ( isset( $this->cache[ $key ][ 'value' ] ) && false !== $this->cache[ $key ][ 'value' ] ) {
+ return false;
+ }
+
+ $mc = $this->get_mc( $group );
+
+ $expire = intval( $expire );
+ if ( 0 === $expire || $expire > $this->max_expiration ) {
+ $expire = $this->default_expiration;
+ }
+
+ $size = $this->get_data_size( $data );
+ $this->timer_start();
+ $result = $mc->add( $key, $data, false, $expire );
+ $elapsed = $this->timer_stop();
+
+ $comment = '';
+ if ( isset( $this->cache[ $key ] ) ) {
+ $comment .= ' [lc already]';
+ }
+ if ( false === $result ) {
+ $comment .= ' [mc already]';
+ }
+
+ $this->group_ops_stats( 'add', $key, $group, $size, $elapsed, $comment );
+
+ if ( false !== $result ) {
+ $this->cache[ $key ] = [
+ 'value' => $data,
+ 'found' => true,
+ ];
+ } else if ( false === $result && true === isset( $this->cache[$key][ 'value' ] ) && false === $this->cache[$key][ 'value' ] ) {
+ /*
+ * Here we unset local cache if remote add failed and local cache value is equal to `false` in order
+ * to update the local cache anytime we get a new information from remote server. This way, the next
+ * cache get will go to remote server and will fetch recent data.
+ */
+ unset( $this->cache[$key] );
+ }
+
+ return $result;
+ }
+
+ public function add_multiple( array $data, $group = '', $expire = 0 ) {
+ $values = array();
+
+ foreach ( $data as $key => $value ) {
+ $values[ $key ] = $this->add( $key, $value, $group, $expire );
+ }
+
+ return $values;
+ }
+
+ function add_global_groups( $groups ) {
+ if ( ! is_array( $groups ) ) {
+ $groups = (array) $groups;
+ }
+
+ $this->global_groups = array_merge( $this->global_groups, $groups );
+ $this->global_groups = array_unique( $this->global_groups );
+ }
+
+ function add_non_persistent_groups( $groups ) {
+ if ( ! is_array( $groups ) ) {
+ $groups = (array) $groups;
+ }
+
+ $this->no_mc_groups = array_merge( $this->no_mc_groups, $groups );
+ $this->no_mc_groups = array_unique( $this->no_mc_groups );
+ }
+
+ function incr( $id, $n = 1, $group = 'default' ) {
+ $key = $this->key( $id, $group );
+ $mc = $this->get_mc( $group );
+
+ $incremented = $mc->increment( $key, $n );
+
+ $this->cache[ $key ] = [
+ 'value' => $incremented,
+ 'found' => false !== $incremented,
+ ];
+
+ return $this->cache[ $key ][ 'value' ];
+ }
+
+ function decr( $id, $n = 1, $group = 'default' ) {
+ $key = $this->key( $id, $group );
+ $mc = $this->get_mc( $group );
+
+ $decremented = $mc->decrement( $key, $n );
+ $this->cache[ $key ] = [
+ 'value' => $decremented,
+ 'found' => false !== $decremented,
+ ];
+
+ return $this->cache[ $key ][ 'value' ];
+ }
+
+ function close() {
+ foreach ( $this->mc as $bucket => $mc ) {
+ $mc->close();
+ }
+ }
+
+ function delete( $id, $group = 'default' ) {
+ $key = $this->key( $id, $group );
+
+ if ( in_array( $group, $this->no_mc_groups ) ) {
+ unset( $this->cache[ $key ] );
+
+ return true;
+ }
+
+ $mc = $this->get_mc( $group );
+
+ $this->timer_start();
+ $result = $mc->delete( $key );
+ $elapsed = $this->timer_stop();
+
+ $this->group_ops_stats( 'delete', $key, $group, null, $elapsed );
+
+ if ( false !== $result ) {
+ unset( $this->cache[ $key ] );
+ }
+
+ return $result;
+ }
+
+ public function delete_multiple( array $keys, $group = '' ) {
+ $values = array();
+
+ foreach ( $keys as $key ) {
+ $values[ $key ] = $this->delete( $key, $group );
+ }
+
+ return $values;
+ }
+
+ // Gets number from all default servers, replicating if needed
+ function get_max_flush_number( $group ) {
+ $key = $this->key( $this->flush_key, $group );
+
+ $values = array();
+ $size = 19; // size of microsecond timestamp serialized
+ foreach ( $this->default_mcs as $i => $mc ) {
+ $flags = false;
+ $this->timer_start();
+ $values[ $i ] = $mc->get( $key, $flags );
+ $elapsed = $this->timer_stop();
+
+ if ( empty( $values[ $i ] ) ) {
+ $this->group_ops_stats( 'get_flush_number', $key, $group, null, $elapsed, 'not_in_memcache' );
+ } else {
+ $this->group_ops_stats( 'get_flush_number', $key, $group, $size, $elapsed, 'memcache' );
+ }
+ }
+
+ $max = max( $values );
+
+ if ( ! $max > 0 ) {
+ return false;
+ }
+
+ // Replicate to servers not having the max.
+ $expire = 0;
+ foreach ( $this->default_mcs as $i => $mc ) {
+ if ( $values[ $i ] < $max ) {
+ $this->timer_start();
+ $mc->set( $key, $max, false, $expire );
+ $elapsed = $this->timer_stop();
+ $this->group_ops_stats( 'set_flush_number', $key, $group, $size, $elapsed, 'replication_repair' );
+ }
+ }
+
+ return $max;
+ }
+
+ function set_flush_number( $value, $group ) {
+ $key = $this->key( $this->flush_key, $group );
+ $expire = 0;
+ $size = 19;
+ foreach ( $this->default_mcs as $i => $mc ) {
+ $this->timer_start();
+ $mc->set( $key, $value, false, $expire );
+ $elapsed = $this->timer_stop();
+ $this->group_ops_stats( 'set_flush_number', $key, $group, $size, $elapsed, 'replication' );
+ }
+ }
+
+ function get_flush_number( $group ) {
+ $flush_number = $this->get_max_flush_number( $group );
+ // What if there is no v4 flush number?
+ if ( empty( $flush_number ) ) {
+ // Look for the v3 flush number key.
+ $flush_number = intval( $this->get( $this->old_flush_key, $group ) );
+ if ( !empty( $flush_number ) ) {
+ // Found v3 flush number. Upgrade to v4 with replication.
+ $this->set_flush_number( $flush_number, $group );
+ // Delete v3 key so we can't later restore it and find stale keys.
+ } else {
+ // No flush number found anywhere. Make a new one. This flushes the cache.
+ $flush_number = $this->new_flush_number();
+ $this->set_flush_number( $flush_number, $group );
+ }
+ }
+
+ return $flush_number;
+ }
+
+ function get_global_flush_number() {
+ if ( ! isset( $this->global_flush_number ) ) {
+ $this->global_flush_number = $this->get_flush_number( $this->global_flush_group );
+ }
+ return $this->global_flush_number;
+ }
+
+ function get_blog_flush_number() {
+ if ( ! isset( $this->flush_number[ $this->blog_prefix ] ) ) {
+ $this->flush_number[ $this->blog_prefix ] = $this->get_flush_number( $this->flush_group );
+ }
+ return $this->flush_number[ $this->blog_prefix ];
+ }
+
+ function flush_runtime() {
+ $this->cache = array();
+ $this->group_ops = array();
+
+ return true;
+ }
+
+ function flush() {
+ // Do not use the memcached flush method. It acts on an
+ // entire memcached server, affecting all sites.
+ // Flush is also unusable in some setups, e.g. twemproxy.
+ // Instead, rotate the key prefix for the current site.
+ // Global keys are rotated when flushing on any network's
+ // main site.
+ $this->cache = array();
+
+ $flush_number = $this->new_flush_number();
+
+ $this->rotate_site_keys( $flush_number );
+
+ if ( is_main_site() ) {
+ $this->rotate_global_keys( $flush_number );
+ }
+
+ return true;
+ }
+
+ function rotate_site_keys( $flush_number = null ) {
+ if ( is_null( $flush_number ) ) {
+ $flush_number = $this->new_flush_number();
+ }
+
+ $this->set_flush_number( $flush_number, $this->flush_group );
+
+ $this->flush_number[ $this->blog_prefix ] = $flush_number;
+ }
+
+ function rotate_global_keys( $flush_number = null ) {
+ if ( is_null( $flush_number ) ) {
+ $flush_number = $this->new_flush_number();
+ }
+
+ $this->set_flush_number( $flush_number, $this->global_flush_group );
+
+ $this->global_flush_number = $flush_number;
+ }
+
+ function new_flush_number() {
+ return intval( microtime( true ) * 1e6 );
+ }
+
+ function get( $id, $group = 'default', $force = false, &$found = null ) {
+ $key = $this->key( $id, $group );
+ $mc = $this->get_mc( $group );
+ $found = true;
+
+ if ( isset( $this->cache[ $key ] ) && ( ! $force || in_array( $group, $this->no_mc_groups ) ) ) {
+ if ( isset( $this->cache[ $key ][ 'value' ] ) && is_object( $this->cache[ $key ][ 'value' ] ) ) {
+ $value = clone $this->cache[ $key ][ 'value' ];
+ } else {
+ $value = $this->cache[ $key ][ 'value' ];
+ }
+ $found = $this->cache[ $key ][ 'found' ];
+
+ $this->group_ops_stats( 'get_local', $key, $group, null, null, 'local' );
+ } else if ( in_array( $group, $this->no_mc_groups ) ) {
+ $this->cache[ $key ] = [
+ 'value' => $value = false,
+ 'found' => false,
+ ];
+
+ $found = false;
+
+ $this->group_ops_stats( 'get_local', $key, $group, null, null, 'not_in_local' );
+ } else {
+ $flags = false;
+ $this->timer_start();
+ $value = $mc->get( $key, $flags );
+ $elapsed = $this->timer_stop();
+
+ // Value will be unchanged if the key doesn't exist.
+ if ( false === $flags ) {
+ $found = false;
+ $value = false;
+ } elseif ( false === $value && ( $flags & 0xFF01 ) === 0x01 ) {
+ /*
+ * The lowest byte is used for flags.
+ * 0x01 means the value is serialized (MMC_SERIALIZED).
+ * The second lowest indicates data type: 0 is string, 1 is bool, 3 is long, 7 is double.
+ * `null` is serialized into a string, thus $flags is 0x0001
+ * Empty string will correspond to $flags = 0x0000 (not serialized).
+ * For `false` or `true` $flags will be 0x0100
+ *
+ * See:
+ * - https://github.com/websupport-sk/pecl-memcache/blob/2a5de3c5d9c0bd0acbcf7e6e0b7570f15f89f55b/php7/memcache_pool.h#L61-L76 - PHP 7.x
+ * - https://github.com/websupport-sk/pecl-memcache/blob/ccf702b14b18fce18a1863e115a7b4c964df952e/src/memcache_pool.h#L57-L76 - PHP 8.x
+ *
+ * In PHP 8, they changed the way memcache_get() handles `null`:
+ * https://github.com/websupport-sk/pecl-memcache/blob/ccf702b14b18fce18a1863e115a7b4c964df952e/src/memcache.c#L2175-L2177
+ *
+ * If the return value is `null`, it is silently converted to `false`. We can only rely upon $flags to find out whether `false` is real.
+ */
+ $value = null;
+ }
+
+ $this->cache[ $key ] = [
+ 'value' => $value,
+ 'found' => $found,
+ ];
+
+ if ( is_null( $value ) || $value === false ) {
+ $this->group_ops_stats( 'get', $key, $group, null, $elapsed, 'not_in_memcache' );
+ } else if ( 'checkthedatabaseplease' === $value ) {
+ $this->group_ops_stats( 'get', $key, $group, null, $elapsed, 'checkthedatabaseplease' );
+ } else {
+ $size = $this->get_data_size( $value );
+ $this->group_ops_stats( 'get', $key, $group, $size, $elapsed, 'memcache' );
+ }
+ }
+
+ if ( 'checkthedatabaseplease' === $value ) {
+ unset( $this->cache[ $key ] );
+
+ $found = false;
+ $value = false;
+ }
+
+ return $value;
+ }
+
+ function get_multi( $groups ) {
+ /*
+ format: $get['group-name'] = array( 'key1', 'key2' );
+ */
+ $return = array();
+ $return_cache = array(
+ 'value' => false,
+ 'found' => false,
+ );
+
+ foreach ( $groups as $group => $ids ) {
+ $mc = $this->get_mc( $group );
+ $keys = array();
+ $this->timer_start();
+
+ foreach ( $ids as $id ) {
+ $key = $this->key( $id, $group );
+ $keys[] = $key;
+
+ if ( isset( $this->cache[ $key ] ) ) {
+ if ( is_object( $this->cache[ $key ][ 'value'] ) ) {
+ $return[ $key ] = clone $this->cache[ $key ][ 'value'];
+ $return_cache[ $key ] = [
+ 'value' => clone $this->cache[ $key ][ 'value'],
+ 'found' => $this->cache[ $key ][ 'found'],
+ ];
+ } else {
+ $return[ $key ] = $this->cache[ $key ][ 'value'];
+ $return_cache[ $key ] = [
+ 'value' => $this->cache[ $key ][ 'value' ],
+ 'found' => $this->cache[ $key ][ 'found' ],
+ ];
+ }
+
+ continue;
+ } else if ( in_array( $group, $this->no_mc_groups ) ) {
+ $return[ $key ] = false;
+ $return_cache[ $key ] = [
+ 'value' => false,
+ 'found' => false,
+ ];
+
+ continue;
+ } else {
+ $fresh_get = $mc->get( $key );
+ $return[ $key ] = $fresh_get;
+ $return_cache[ $key ] = [
+ 'value' => $fresh_get,
+ 'found' => false !== $fresh_get,
+ ];
+ }
+ }
+
+ $elapsed = $this->timer_stop();
+ $this->group_ops_stats( 'get_multi', $keys, $group, null, $elapsed );
+ }
+
+ $this->cache = array_merge( $this->cache, $return_cache );
+
+ return $return;
+ }
+
+ public function get_multiple( $keys, $group = 'default', $force = false ) {
+ $mc = $this->get_mc( $group );
+
+ $no_mc = in_array( $group, $this->no_mc_groups, true );
+
+ $uncached_keys = array();
+ $return = array();
+ $return_cache = array();
+
+ foreach ( $keys as $id ) {
+ $key = $this->key( $id, $group );
+
+ if ( isset( $this->cache[ $key ] ) && ( ! $force || $no_mc ) ) {
+ $value = $this->cache[ $key ]['found'] ? $this->cache[ $key ]['value'] : false;
+ $return[ $id ] = is_object( $value ) ? clone $value : $value;
+ } else if ( $no_mc ) {
+ $return[ $id ] = false;
+ $return_cache[ $key ] = [
+ 'value' => false,
+ 'found' => false,
+ ];
+ } else {
+ $uncached_keys[ $id ] = $key;
+ }
+ }
+
+ if ( $uncached_keys ) {
+ $this->timer_start();
+ $uncached_keys_list = array_values( $uncached_keys );
+ $values = $mc->get( $uncached_keys_list );
+ $elapsed = $this->timer_stop();
+
+ $this->group_ops_stats( 'get_multiple', $uncached_keys_list, $group, null, $elapsed );
+
+ foreach ( $uncached_keys as $id => $key ) {
+ $found = array_key_exists( $key, $values );
+ $value = $found ? $values[ $key ] : false;
+
+ $return[ $id ] = $value;
+ $return_cache[ $key ] = [
+ 'value' => $value,
+ 'found' => $found,
+ ];
+ }
+ }
+
+ $this->cache = array_merge( $this->cache, $return_cache );
+
+ return $return;
+ }
+
+ function flush_prefix( $group ) {
+ if ( $group === $this->flush_group || $group === $this->global_flush_group ) {
+ // Never flush the flush numbers.
+ $number = '_';
+ } elseif ( false !== array_search( $group, $this->global_groups ) ) {
+ $number = $this->get_global_flush_number();
+ } else {
+ $number = $this->get_blog_flush_number();
+ }
+ return $number . ':';
+ }
+
+ function key( $key, $group ) {
+ if ( empty( $group ) ) {
+ $group = 'default';
+ }
+
+ $prefix = $this->key_salt;
+
+ $prefix .= $this->flush_prefix( $group );
+
+ if ( false !== array_search( $group, $this->global_groups ) ) {
+ $prefix .= $this->global_prefix;
+ } else {
+ $prefix .= $this->blog_prefix;
+ }
+
+ return preg_replace( '/\s+/', '', "$prefix:$group:$key" );
+ }
+
+ function replace( $id, $data, $group = 'default', $expire = 0 ) {
+ $key = $this->key( $id, $group );
+ $expire = intval( $expire );
+ if ( 0 === $expire || $expire > $this->max_expiration ) {
+ $expire = $this->default_expiration;
+ }
+ $mc = $this->get_mc( $group );
+
+ if ( is_object( $data ) ) {
+ $data = clone $data;
+ }
+
+ $size = $this->get_data_size( $data );
+ $this->timer_start();
+ $result = $mc->replace( $key, $data, false, $expire );
+ $elapsed = $this->timer_stop();
+ $this->group_ops_stats( 'replace', $key, $group, $size, $elapsed );
+
+ if ( false !== $result ) {
+ $this->cache[ $key ] = [
+ 'value' => $data,
+ 'found' => true,
+ ];
+ }
+
+ return $result;
+ }
+
+ function set( $id, $data, $group = 'default', $expire = 0 ) {
+ $key = $this->key( $id, $group );
+
+ if ( isset( $this->cache[ $key ] ) && ( 'checkthedatabaseplease' === $this->cache[ $key ][ 'value' ] ) ) {
+ return false;
+ }
+
+ if ( is_object( $data ) ) {
+ $data = clone $data;
+ }
+
+ $this->cache[ $key ] = [
+ 'value' => $data,
+ 'found' => false, // Set to false as not technically found in memcache at this point.
+ ];
+
+ if ( in_array( $group, $this->no_mc_groups ) ) {
+ $this->group_ops_stats( 'set_local', $key, $group, null, null );
+
+ return true;
+ }
+
+ $expire = intval( $expire );
+ if ( 0 === $expire || $expire > $this->max_expiration ) {
+ $expire = $this->default_expiration;
+ }
+
+ $mc = $this->get_mc( $group );
+
+ $size = $this->get_data_size( $data );
+ $this->timer_start();
+ $result = $mc->set( $key, $data, false, $expire );
+ $elapsed = $this->timer_stop();
+ $this->group_ops_stats( 'set', $key, $group, $size, $elapsed );
+
+ // Update the found cache value with the result of the set in memcache.
+ $this->cache[ $key ][ 'found' ] = $result;
+
+ return $result;
+ }
+
+ public function set_multiple( array $data, $group = '', $expire = 0 ) {
+ $values = array();
+
+ foreach ( $data as $key => $value ) {
+ $values[ $key ] = $this->set( $key, $value, $group, $expire );
+ }
+
+ return $values;
+ }
+
+ function switch_to_blog( $blog_id ) {
+ global $table_prefix;
+
+ $blog_id = (int) $blog_id;
+
+ $this->blog_prefix = ( is_multisite() ? $blog_id : $table_prefix );
+ }
+
+ function colorize_debug_line( $line, $trailing_html = '' ) {
+ $colors = array(
+ 'get' => 'green',
+ 'get_local' => 'lightgreen',
+ 'get_multi' => 'fuchsia',
+ 'get_multiple' => 'navy',
+ 'set' => 'purple',
+ 'set_local' => 'orchid',
+ 'add' => 'blue',
+ 'delete' => 'red',
+ 'delete_local' => 'tomato',
+ 'slow-ops' => 'crimson',
+ );
+
+ $cmd = substr( $line, 0, strpos( $line, ' ' ) );
+
+ // Start off with a neutral default color...
+ $color_for_cmd = 'brown';
+ // And if the cmd has a specific color, use that instead
+ if ( isset( $colors[ $cmd ] ) ) {
+ $color_for_cmd = $colors[ $cmd ];
+ }
+
+ $cmd2 = "" . esc_html( $cmd ) . " ";
+
+ return $cmd2 . esc_html( substr( $line, strlen( $cmd ) ) ) . "$trailing_html\n";
+ }
+
+ function js_toggle() {
+ echo "
+
+ ";
+ }
+
+ /**
+ * Returns the collected raw stats.
+ *
+ * @return array $stats
+ */
+ function get_stats() {
+ $stats = [];
+ $stats['totals'] = [
+ 'query_time' => $this->time_total,
+ 'size' => $this->size_total,
+ ];
+ $stats['operation_counts'] = $this->stats;
+ $stats['operations'] = [];
+ $stats['groups'] = [];
+ $stats['slow-ops'] = [];
+ $stats['slow-ops-groups'] = [];
+ foreach ( $this->group_ops as $cache_group => $dataset ) {
+ if ( empty( $cache_group ) ) {
+ $cache_group = 'default';
+ }
+
+ foreach ( $dataset as $data ) {
+ $operation = $data[0];
+ $op = [
+ 'key' => $data[1],
+ 'size' => $data[2],
+ 'time' => $data[3],
+ 'group' => $cache_group,
+ 'result' => $data[4],
+ ];
+
+ if ( $cache_group === 'slow-ops' ) {
+ $key = 'slow-ops';
+ $groups_key = 'slow-ops-groups';
+ $op['group'] = $data[5];
+ $op['backtrace'] = $data[6];
+ } else {
+ $key = 'operations';
+ $groups_key = 'groups';
+ }
+
+ $stats[ $key ][ $operation ][] = $op;
+
+ if ( ! in_array( $op['group'], $stats[ $groups_key ] ) ) {
+ $stats[ $groups_key ][] = $op['group'];
+ }
+ }
+ }
+
+ return $stats;
+ }
+
+
+ function stats() {
+ $this->js_toggle();
+
+ echo 'Total memcache query time: ' . number_format_i18n( sprintf( '%0.1f', $this->time_total * 1000 ), 1 ) . ' ms ';
+ echo "\n";
+ echo 'Total memcache size: ' . esc_html( size_format( $this->size_total, 2 ) ) . ' ';
+ echo "\n";
+
+ foreach ( $this->stats as $stat => $n ) {
+ if ( empty( $n ) ) {
+ continue;
+ }
+
+ echo '';
+ echo $this->colorize_debug_line( "$stat $n" );
+ echo ' ';
+ }
+
+ echo "\n";
+
+ echo "";
+ }
+
+ function get_group_ops_line( $index, $arr ) {
+ // operation
+ $line = "{$arr[0]} ";
+
+ // key
+ $json_encoded_key = json_encode( $arr[1] );
+ $line .= $json_encoded_key . " ";
+
+ // comment
+ if ( ! empty( $arr[4] ) ) {
+ $line .= "{$arr[4]} ";
+ }
+
+ // size
+ if ( isset( $arr[2] ) ) {
+ $line .= '(' . size_format( $arr[2], 2 ) . ') ';
+ }
+
+ // time
+ if ( isset( $arr[3] ) ) {
+ $line .= '(' . number_format_i18n( sprintf( '%0.1f', $arr[3] * 1000 ), 1 ) . ' ms)';
+ }
+
+ // backtrace
+ $bt_link = '';
+ if ( isset( $arr[6] ) ) {
+ $key_hash = md5( $index . $json_encoded_key );
+ $bt_link = " Toggle Backtrace ";
+ $bt_link .= "" . esc_html( $arr[6] ) . " ";
+ }
+
+ return $this->colorize_debug_line( $line, $bt_link );
+ }
+
+ /**
+ * @param int|string $group
+ * @return Memcache
+ */
+ function get_mc( $group ) {
+ if ( isset( $this->mc[ $group ] ) ) {
+ return $this->mc[ $group ];
+ }
+
+ return $this->mc['default'];
+ }
+
+ function failure_callback( $host, $port ) {
+ $this->connection_errors[] = array(
+ 'host' => $host,
+ 'port' => $port,
+ );
+ }
+
+ function salt_keys( $key_salt ) {
+ if ( strlen( $key_salt ) ) {
+ $this->key_salt = $key_salt . ':';
+ } else {
+ $this->key_salt = '';
+ }
+ }
+
+ function __construct() {
+ global $memcached_servers;
+
+ if ( isset( $memcached_servers ) ) {
+ $buckets = $memcached_servers;
+ } else {
+ $buckets = array( '127.0.0.1:11211' );
+ }
+
+ reset( $buckets );
+
+ if ( is_int( key( $buckets ) ) ) {
+ $buckets = array( 'default' => $buckets );
+ }
+
+ foreach ( $buckets as $bucket => $servers ) {
+ $this->mc[ $bucket ] = new Memcache();
+
+ foreach ( $servers as $i => $server ) {
+ if ( 'unix://' == substr( $server, 0, 7 ) ) {
+ $node = $server;
+ $port = 0;
+ } else {
+ if ( false === strpos( $server, ':' ) ) {
+ $node = $server;
+ $port = ini_get( 'memcache.default_port' );
+ } else {
+ list ( $node, $port ) = explode( ':', $server, 2 );
+ }
+
+ $port = intval( $port );
+
+ if ( ! $port ) {
+ $port = 11211;
+ }
+ }
+
+ $this->mc[ $bucket ]->addServer( $node, $port, true, 1, 1, 15, true, array( $this, 'failure_callback' ) );
+ $this->mc[ $bucket ]->setCompressThreshold( 20000, 0.2 );
+
+ // Prepare individual connections to servers in default bucket for flush_number redundancy
+ if ( 'default' === $bucket ) {
+ $this->default_mcs[ $i ] = new Memcache();
+ $this->default_mcs[ $i ]->addServer( $node, $port, true, 1, 1, 15, true, array( $this, 'failure_callback' ) );
+ }
+ }
+ }
+
+ global $blog_id, $table_prefix;
+
+ $this->global_prefix = '';
+ $this->blog_prefix = '';
+
+ if ( function_exists( 'is_multisite' ) ) {
+ $this->global_prefix = ( is_multisite() || defined( 'CUSTOM_USER_TABLE' ) && defined( 'CUSTOM_USER_META_TABLE' ) ) ? '' : $table_prefix;
+ $this->blog_prefix = ( is_multisite() ? $blog_id : $table_prefix );
+ }
+
+ $this->salt_keys( WP_CACHE_KEY_SALT );
+
+ $this->cache_hits =& $this->stats['get'];
+ $this->cache_misses =& $this->stats['add'];
+ }
+
+ function increment_stat( $field, $num = 1 ) {
+ if ( ! isset( $this->stats[ $field ] ) ) {
+ $this->stats[ $field ] = $num;
+ } else {
+ $this->stats[ $field ] += $num;
+ }
+ }
+
+ function group_ops_stats( $op, $keys, $group, $size, $time, $comment = '' ) {
+ $this->increment_stat( $op );
+
+ // we have no use of the local ops details for now
+ if ( strpos( $op, '_local' ) ) {
+ return;
+ }
+
+ $this->size_total += $size;
+
+ $keys = $this->strip_memcached_keys( $keys );
+
+ // @codeCoverageIgnoreStart
+ if ( $time > $this->slow_op_microseconds && 'get_multi' !== $op ) {
+ $this->increment_stat( 'slow-ops' );
+ $backtrace = null;
+ if ( function_exists( 'wp_debug_backtrace_summary' ) ) {
+ $backtrace = wp_debug_backtrace_summary();
+ }
+ $this->group_ops['slow-ops'][] = array( $op, $keys, $size, $time, $comment, $group, $backtrace );
+ }
+ // @codeCoverageIgnoreEnd
+
+ $this->group_ops[ $group ][] = array( $op, $keys, $size, $time, $comment );
+ }
+
+ /**
+ * Key format: key_salt:flush_number:table_prefix:key_name
+ *
+ * We want to strip the `key_salt:flush_number` part to not leak the memcached keys.
+ * If `key_salt` is set we strip `'key_salt:flush_number`, otherwise just strip the `flush_number` part.
+ */
+ function strip_memcached_keys( $keys ) {
+ if ( ! is_array( $keys ) ) {
+ $keys = [ $keys ];
+ }
+
+ foreach ( $keys as $key => $value ) {
+ $offset = 0;
+ if ( ! empty( $this->key_salt ) ) {
+ $offset = strpos( $value, ':' ) + 1;
+ }
+
+ $start = strpos( $value, ':', $offset );
+ $keys[ $key ] = substr( $value, $start + 1 );
+ }
+
+ if ( 1 === count( $keys ) ) {
+ return $keys[0];
+ }
+
+ return $keys;
+ }
+
+ function timer_start() {
+ $this->time_start = microtime( true );
+
+ return true;
+ }
+
+ function timer_stop() {
+ $time_total = microtime( true ) - $this->time_start;
+ $this->time_total += $time_total;
+
+ return $time_total;
+ }
+
+ function get_data_size( $data ) {
+ if ( is_string( $data ) ) {
+ return strlen( $data );
+ }
+
+ $serialized = serialize( $data );
+
+ return strlen( $serialized );
+ }
+}
diff --git a/plugins/memcached/readme.txt b/plugins/memcached/readme.txt
new file mode 100644
index 00000000..84d1304d
--- /dev/null
+++ b/plugins/memcached/readme.txt
@@ -0,0 +1,140 @@
+=== Memcached Object Cache ===
+Contributors: ryan, sivel, andy, nacin, barry, ethitter, nickdaugherty, batmoo, simonwheatley, jenkoian, bor0, aidvu
+Tags: cache, memcached
+Requires at least: 5.3
+Tested up to: 6.0
+Stable tag: 4.0.0
+Requires PHP: 7.4.0
+
+Use memcached and the PECL memcache extension to provide a backing store for the WordPress object cache.
+
+== Description ==
+Memcached Object Cache provides a persistent backend for the WordPress object cache. A memcached server and the PECL memcache extension are required.
+
+== Installation ==
+1. Install [memcached](http://danga.com/memcached) on at least one server. Note the connection info. The default is `127.0.0.1:11211`.
+
+1. Install the [PECL memcache extension](http://pecl.php.net/package/memcache)
+
+1. Copy object-cache.php to wp-content
+
+1. Add the `WP_CACHE_KEY_SALT` constant to the `wp-config.php`:
+
+```php
+define( 'WP_CACHE_KEY_SALT', '...long random string...' );
+```
+
+This helps prevent cache pollution when multiplte WordPress installs are using the same Memcached server. The value must be unique for each WordPress install.
+
+== Frequently Asked Questions ==
+
+= How can I manually specify the memcached server(s)? =
+
+Add something similar to the following to wp-config.php above `/* That's all, stop editing! Happy blogging. */`:
+
+`
+$memcached_servers = array(
+ 'default' => array(
+ '10.10.10.20:11211',
+ '10.10.10.30:11211'
+ )
+);
+`
+
+The top level array keys, are cache groups, where 'default' corresponds to any cache group that is not explicitly defined. This allows for specifying memcached servers that only handle certain cache groups. The most common use is only specifying 'default'.
+
+Possible cache groups are:
+
+`
+{$taxonomy}_relationships
+{$meta_type}_meta
+{$taxonomy}_relationships
+blog-details
+blog-id-cache
+blog-lookup
+bookmark
+calendar
+category
+comment
+counts
+general
+global-posts
+options
+plugins
+post_ancestors
+post_meta
+posts
+rss
+site-lookup
+site-options
+site-transient
+terms
+themes
+timeinfo
+transient
+user_meta
+useremail
+userlogins
+usermeta
+users
+userslugs
+widget
+`
+
+== Changelog ==
+
+= 4.0.0 =
+* Add preemptive filter pre_wp_cache_get
+* Add flush_number replication to prevent accidental flush due to flush_number eviction, server rotation, etc.
+
+= 3.2.2 =
+* Remove filter, and base key stripping on presence of `key_salt`
+
+= 3.2.1 =
+* Fix bug allowing **slow-ops** entries to have the same key, so toggling doesn't work
+
+= 3.2.0 =
+* Better stats(). Now shows cache group/individual calls with size of the payload and timings.
+* PHP 5.6.20 is now required
+* Fix **get_multi** to show per group calls
+* Added filter **(memcached_strip_keys)** to bypass memcached key stripping
+* Special group for **slow-ops** ( > 5ms ) with backtrace
+
+= 3.1.0 =
+* Add **wp_cache_get_multi**
+* Add support for the **$found** parameter
+* Set a variable for $max_expiration to 30 days
+* Code style changes
+* Different coloring for unknown stats group
+* Store host/port on failure_callback
+* Default stats counts
+
+= 3.0.2 =
+* Better output of HTML
+
+= 3.0.1 =
+* Fix key generation error in switch_to_blog()
+
+= 3.0.0 =
+* Flush site cache by rotating keys
+* Flush global cache when flushing main site
+
+= 2.0.6 =
+* Flush the local cache on wp_cache_flush()
+
+= 2.0.5 =
+* Fix missing global in switch_to_blog
+
+= 2.0.4 =
+* Remove deprecated constructor
+
+= 2.0.3 =
+* Support for unix sockets
+
+= 2.0.2 =
+* Break references by cloning objects
+* Keep local cache in sync with memcached when using incr and decr
+* Handle limited environments where is_multisite() is not defined
+* Fix setting and getting 0
+* PHP 5.2.4 is now required
+* Use the WP_CACHE_KEY_SALT constant if available to guarantee uniqueness of keys
diff --git a/mu-plugins/redirects.php b/plugins/redirects.php
similarity index 65%
rename from mu-plugins/redirects.php
rename to plugins/redirects.php
index dc9f7175..d637ddff 100644
--- a/mu-plugins/redirects.php
+++ b/plugins/redirects.php
@@ -4,20 +4,18 @@
* Description: Adds custom XML-RPC methods to control redirection.
*/
-$jquery_redirects = 'jquery_redirects';
-
add_filter( 'template_redirect', function() {
- global $jquery_redirects;
-
- // Only handle 404 Not Found
- if ( !is_404() ) {
+ if ( is_404() ) {
+ $url = trailingslashit( $_SERVER[ 'REQUEST_URI' ] );
+ } elseif ( is_front_page() ) {
+ $url = "/";
+ } else {
+ // Don't influence any other pages
return;
}
- $url = trailingslashit( $_SERVER[ 'REQUEST_URI' ] );
-
- // Check for redirects stored in the transients
- $transient = get_option( $jquery_redirects );
+ // Check for redirects stored in the database
+ $transient = get_option( 'jquery_redirects' );
if ( $transient && !empty( $transient[ $url ] ) ) {
wp_redirect( $transient[ $url ], 301 );
@@ -31,7 +29,6 @@
function jq_set_redirects( $args ) {
global $wp_xmlrpc_server;
- global $jquery_redirects;
// Authenticate
$username = $args[ 1 ];
@@ -42,5 +39,5 @@ function jq_set_redirects( $args ) {
}
// Store redirects
- return update_option( $jquery_redirects, json_decode( $args[ 3 ], true ) );
+ return update_option( 'jquery_redirects', json_decode( $args[ 3 ], true ) );
}
diff --git a/plugins/vaultpress/class.vaultpress-database.php b/plugins/vaultpress/class.vaultpress-database.php
deleted file mode 100644
index 8938954f..00000000
--- a/plugins/vaultpress/class.vaultpress-database.php
+++ /dev/null
@@ -1,338 +0,0 @@
-table=$table;
- if ( $parse_create_table ) {
- $this->structure = $this->parse_create_table( $this->show_create() );
- }
- }
-
- function get_tables( $filter=null ) {
- global $wpdb;
- $rval = $wpdb->get_col( 'SHOW TABLES' );
- if ( $filter )
- $rval = preg_grep( $filter, $rval );
- return $rval;
- }
-
- function show_create() {
- global $wpdb;
- if ( !$this->table )
- return false;
- $table = $wpdb->escape( $this->table );
- $results = $wpdb->get_row( "SHOW CREATE TABLE `$table`" );
- $want = 'Create Table';
- if ( $results )
- $results = $results->$want;
- return $results;
- }
-
- function explain() {
- global $wpdb;
- if ( !$this->table )
- return false;
- $table = $wpdb->escape( $this->table );
- return $wpdb->get_results( "EXPLAIN `$table`" );
- }
-
- function diff( $signatures ) {
- global $wpdb;
- if ( !is_array( $signatures ) || !count( $signatures ) )
- return false;
- if ( !$this->table )
- return false;
- $table = $wpdb->escape( $this->table );
- $diff = array();
- foreach ( $signatures as $where => $signature ) {
- $pksig = md5( $where );
- unset( $wpdb->queries );
- $row = $wpdb->get_row( "SELECT * FROM `$table` WHERE $where" );
- if ( !$row ) {
- $diff[$pksig] = array ( 'change' => 'deleted', 'where' => $where );
- continue;
- }
- $row = serialize( $row );
- $hash = md5( $row );
- if ( $hash != $signature )
- $diff[$pksig] = array( 'change' => 'modified', 'where' => $where, 'signature' => $hash, 'row' => $row );
- }
- return $diff;
- }
-
- function count( $columns ) {
- global $wpdb;
- if ( !is_array( $columns ) || !count( $columns ) )
- return false;
- if ( !$this->table )
- return false;
- $table = $wpdb->escape( $this->table );
- $column = $wpdb->escape( array_shift( $columns ) );
- return $wpdb->get_var( "SELECT COUNT( $column ) FROM `$table`" );
- }
-
- function wpdb( $query, $function='get_results' ) {
- global $wpdb;
-
- if ( !is_callable( array( $wpdb, $function ) ) )
- return false;
-
- $res = $wpdb->$function( $query );
- if ( !$res )
- return $res;
- switch ( $function ) {
- case 'get_results':
- foreach ( $res as $idx => $row ) {
- if ( isset( $row->option_name ) && $row->option_name == 'cron' )
- $res[$idx]->option_value = serialize( array() );
- }
- break;
- case 'get_row':
- if ( isset( $res->option_name ) && $res->option_name == 'cron' )
- $res->option_value = serialize( array() );
- break;
- }
- return $res;
- }
-
- function get_cols( $columns, $limit=false, $offset=false, $where=false ) {
- global $wpdb;
- if ( !is_array( $columns ) || !count( $columns ) )
- return false;
- if ( !$this->table )
- return false;
- $table = $wpdb->escape( $this->table );
- $limitsql = '';
- $offsetsql = '';
- $wheresql = '';
- if ( $limit )
- $limitsql = ' LIMIT ' . intval( $limit );
- if ( $offset )
- $offsetsql = ' OFFSET ' . intval( $offset );
- if ( $where )
- $wheresql = ' WHERE ' . base64_decode($where);
- $rval = array();
- foreach ( $wpdb->get_results( "SELECT * FROM `$this->table` $wheresql $limitsql $offsetsql" ) as $row ) {
- // We don't need to actually record a real cron option value, just an empty array
- if ( isset( $row->option_name ) && $row->option_name == 'cron' )
- $row->option_value = serialize( array() );
- if ( !empty( $this->structure ) ) {
- $hash = md5( $this->convert_to_sql_string( $row, $this->structure->columns ) );
- foreach ( get_object_vars( $row ) as $i => $v ) {
- if ( !in_array( $i, $columns ) )
- unset( $row->$i );
- }
-
- $row->hash = $hash;
- } else {
- $keys = array();
- $vals = array();
- foreach ( get_object_vars( $row ) as $i => $v ) {
- $keys[] = sprintf( "`%s`", $wpdb->escape( $i ) );
- $vals[] = sprintf( "'%s'", $wpdb->escape( $v ) );
- if ( !in_array( $i, $columns ) )
- unset( $row->$i );
- }
- $row->hash = md5( sprintf( "(%s) VALUES(%s)", implode( ',',$keys ), implode( ',',$vals ) ) );
- }
- $rval[]=$row;
- }
- return $rval;
- }
-
- /**
- * Convert a PHP object to a mysqldump compatible string, using the provided data type information.
- **/
- function convert_to_sql_string( $data, $datatypes ) {
- global $wpdb;
- if ( !is_object( $data ) || !is_object( $datatypes ) )
- return false;
-
- foreach ( array_keys( (array)$data ) as $key )
- $keys[] = sprintf( "`%s`", $wpdb->escape( $key ) );
- foreach ( (array)$data as $key => $val ) {
- if ( null === $val ) {
- $vals[] = 'NULL';
- continue;
- }
- $type = 'text';
- if ( isset( $datatypes->$key->type ) )
- $type= strtolower( $datatypes->$key->type );
- if ( preg_match( '/int|double|float|decimal|bool/i', $type ) )
- $type = 'number';
-
- if ( 'number' === $type ) {
- // do not add quotes to numeric types.
- $vals[] = $val;
- } else {
- $val = $wpdb->escape( $val );
- // Escape characters that aren't escaped by $wpdb->escape(): \n, \r, etc.
- $val = str_replace( array( "\x0a", "\x0d", "\x1a" ), array( '\n', '\r', '\Z' ), $val );
- $vals[] = sprintf( "'%s'", $val );
- }
- }
- if ( !count($keys) )
- return false;
- // format the row as a mysqldump line: (`column1`, `column2`) VALUES (numeric_value1,'text value 2')
- return sprintf( "(%s) VALUES (%s)", implode( ', ',$keys ), implode( ',',$vals ) );
- }
-
-
-
- function parse_create_table( $sql ) {
- $table = new stdClass();
-
- $table->raw = $sql;
- $table->columns = new stdClass();
- $table->primary = null;
- $table->uniques = new stdClass();
- $table->keys = new stdClass();
- $sql = explode( "\n", trim( $sql ) );
- $table->engine = preg_replace( '/^.+ ENGINE=(\S+) .+$/i', "$1", $sql[(count($sql)-1)] );
- $table->charset = preg_replace( '/^.+ DEFAULT CHARSET=(\S+)( .+)?$/i', "$1", $sql[(count($sql)-1)] );
- $table->single_int_paging_column = null;
-
- foreach ( $sql as $idx => $val )
- $sql[$idx] = trim($val);
- $columns = preg_grep( '/^\s*`[^`]+`\s*\S*/', $sql );
- if ( !$columns )
- return false;
-
- $table->name = preg_replace( '/(^[^`]+`|`[^`]+$)/', '', array_shift( preg_grep( '/^CREATE\s+TABLE\s+/', $sql ) ) );
-
- foreach ( $columns as $line ) {
- preg_match( '/^`([^`]+)`\s+([a-z]+)(\(\d+\))?\s*/', $line, $m );
- $name = $m[1];
- $table->columns->$name = new stdClass();
- $table->columns->$name->null = (bool)stripos( $line, ' NOT NULL ' );
- $table->columns->$name->type = $m[2];
- if ( isset($m[3]) ) {
- if ( substr( $m[3], 0, 1 ) == '(' )
- $table->columns->$name->length = substr( $m[3], 1, -1 );
- else
- $table->columns->$name->length = $m[3];
- } else {
- $table->columns->$name->length = null;
- }
- if ( preg_match( '/ character set (\S+)/i', $line, $m ) ) {
- $table->columns->$name->charset = $m[1];
- } else {
- $table->columns->$name->charset = '';
- }
- if ( preg_match( '/ collate (\S+)/i', $line, $m ) ) {
- $table->columns->$name->collate = $m[1];
- } else {
- $table->columns->$name->collate = '';
- }
- if ( preg_match( '/ DEFAULT (.+),$/i', $line, $m ) ) {
- if ( substr( $m[1], 0, 1 ) == "'" )
- $table->columns->$name->default = substr( $m[1], 1, -1 );
- else
- $table->columns->$name->default = $m[1];
- } else {
- $table->columns->$name->default = null;
- }
- $table->columns->$name->line = $line;
- }
- $pk = preg_grep( '/^PRIMARY\s+KEY\s+/i', $sql );
- if ( count( $pk ) ) {
- $pk = array_pop( $pk );
- $pk = preg_replace( '/(^[^\(]+\(`|`\),?$)/', '', $pk );
- $pk = preg_replace( '/\([0-9]+\)/', '', $pk );
- $pk = explode( '`,`', $pk );
- $table->primary = $pk;
- }
- if ( is_array( $table->primary ) && count( $table->primary ) == 1 ) {
- $pk_column_name = $table->primary[0];
- switch( strtolower( $table->columns->$pk_column_name->type ) ) {
- // Integers, exact value
- case 'tinyint':
- case 'smallint':
- case 'int':
- case 'integer':
- case 'bigint':
- // Fixed point, exact value
- case 'decimal':
- case 'numeric':
- // Floating point, approximate value
- case 'float':
- case 'double':
- case 'real':
- // Date and Time
- case 'date':
- case 'datetime':
- case 'timestamp':
- $table->single_int_paging_column = $pk_column_name;
- break;
- }
- }
- $keys = preg_grep( '/^((?:UNIQUE )?INDEX|(?:UNIQUE )?KEY)\s+/i', $sql );
- if ( !count( $keys ) )
- return $table;
- foreach ( $keys as $idx => $key ) {
- if ( 0 === strpos( $key, 'UNIQUE' ) )
- $is_unique = false;
- else
- $is_unique = true;
-
- // for KEY `refresh` (`ip`,`time_last`) USING BTREE,
- $key = preg_replace( '/ USING \S+ ?(,?)$/', '$1', $key );
-
- // for KEY `id` USING BTREE (`id`),
- $key = preg_replace( '/` USING \S+ \(/i', '` (', $key );
-
- $key = preg_replace( '/^((?:UNIQUE )?INDEX|(?:UNIQUE )?KEY)\s+/i', '', $key );
- $key = preg_replace( '/\([0-9]+\)/', '', $key );
- preg_match( '/^`([^`]+)`\s+\(`(.+)`\),?$/', $key, $m );
- $key = $m[1]; //preg_replace( '/\([^)]+\)/', '', $m[1]);
- if ( !$key )
- continue;
- if ( $is_unique )
- $table->keys->$key = explode( '`,`', $m[2] );
- else
- $table->uniques->$key = explode( '`,`', $m[2] );
- }
-
- $uniques = get_object_vars( $table->uniques );
- foreach( $uniques as $idx => $val ) {
- if ( is_array( $val ) && count( $val ) == 1 ) {
- $pk_column_name = $val[0];
- switch( strtolower( $table->columns->$pk_column_name->type ) ) {
- // Integers, exact value
- case 'tinyint':
- case 'smallint':
- case 'int':
- case 'integer':
- case 'bigint':
- // Fixed point, exact value
- case 'decimal':
- case 'numeric':
- // Floating point, approximate value
- case 'float':
- case 'double':
- case 'real':
- // Date and Time
- case 'date':
- case 'datetime':
- case 'timestamp':
- $table->single_int_paging_column = $pk_column_name;
- break;
- }
- }
- }
-
- if ( empty( $table->primary ) ) {
- if ( !empty( $uniques ) )
- $table->primary = array_shift( $uniques );
- }
-
- return $table;
- }
-}
diff --git a/plugins/vaultpress/class.vaultpress-filesystem.php b/plugins/vaultpress/class.vaultpress-filesystem.php
deleted file mode 100644
index 556fe542..00000000
--- a/plugins/vaultpress/class.vaultpress-filesystem.php
+++ /dev/null
@@ -1,261 +0,0 @@
-dir = realpath( $vp->resolve_content_dir() . 'plugins' );
- $this->type = 'p';
- return true;
- }
- if ( $type == 'themes' ) {
- $this->dir = realpath( $vp->resolve_content_dir() . 'themes' );
- $this->type = 't';
- return true;
- }
- if ( $type == 'uploads' ) {
- $this->dir = realpath( $vp->resolve_upload_path() );
- $this->type = 'u';
- return true;
- }
- if ( $type == 'content' ) {
- $this->dir = realpath( $vp->resolve_content_dir() );
- $this->type = 'c';
- return true;
- }
- if ( $type == 'root' ) {
- $this->dir = realpath( ABSPATH );
- $this->type = 'r';
- return true;
- }
- die( 'naughty naughty' );
- }
-
- function fdump( $file ) {
- header("Content-Type: application/octet-stream;");
- header("Content-Transfer-Encoding: binary");
- @ob_end_clean();
- if ( !file_exists( $file ) || !is_readable( $file ) ) {
- $file_name = basename( $file );
- if ( 'wp-config.php' == $file_name ) {
- $dir = dirname( $file );
- $dir = explode( DIRECTORY_SEPARATOR, $dir );
- array_pop( $dir );
- $dir = implode( DIRECTORY_SEPARATOR, $dir );
- $file = trailingslashit( $dir ) . $file_name;
- if ( !file_exists( $file ) || !is_readable( $file ) )
- die( "no such file" );
- } else {
- die( "no such file" );
- }
- }
- if ( !is_file( $file ) && !is_link( $file ) )
- die( "can only dump files" );
- $fp = @fopen( $file, 'rb' );
- if ( !$fp )
- die( "could not open file" );
- while ( !feof( $fp ) )
- echo @fread( $fp, 8192 );
- @fclose( $fp );
- die();
- }
-
- function stat( $file, $md5=true, $sha1=true ) {
- $rval = array();
- foreach ( stat( $file ) as $i => $v ) {
- if ( is_numeric( $i ) )
- continue;
- $rval[$i] = $v;
- }
- $rval['type'] = filetype( $file );
- if ( $rval['type'] == 'file' ) {
- if ( $md5 )
- $rval['md5'] = md5_file( $file );
- if ( $sha1 )
- $rval['sha1'] = sha1_file( $file );
- }
- $dir = $this->dir;
- if ( 0 !== strpos( $file, $dir ) && 'wp-config.php' == basename( $file ) ) {
- $dir = explode( DIRECTORY_SEPARATOR, $dir );
- array_pop( $dir );
- $dir = implode( DIRECTORY_SEPARATOR, $dir );
- }
- $rval['path'] = str_replace( $dir, '', $file );
- return $rval;
- }
-
- function ls( $what, $md5=false, $sha1=false, $limit=null, $offset=null, $full_list=false ) {
- clearstatcache();
- $path = realpath($this->dir . $what);
- $dir = $this->dir;
- if ( !$path && '/wp-config.php' == $what ) {
- $dir = explode( DIRECTORY_SEPARATOR, $dir );
- array_pop( $dir );
- $dir = implode( DIRECTORY_SEPARATOR, $dir );
- $path = realpath( $dir . $what );
- }
- if ( is_file($path) )
- return $this->stat( $path, $md5, $sha1 );
- if ( is_dir($path) ) {
- $entries = array();
- $current = 0;
- $offset = (int)$offset;
- $orig_limit = (int)$limit;
- $limit = $offset + (int)$limit;
- foreach ( (array)$this->scan_dir( $path ) as $i ) {
- $current++;
- if ( !$full_list && !$this->should_backup_file( $i ) )
- continue;
- if ( $offset >= $current )
- continue;
- if ( $limit && $limit < $current )
- break;
-
- // don't sha1 files over 100MB if we are batching due to memory consumption
- if ( $sha1 && $orig_limit > 1 && is_file( $i ) && (int)@filesize( $i ) > 104857600 )
- $sha1 = false;
-
- $entries[] = $this->stat( $i, $md5, $sha1 );
- }
- return $entries;
- }
- }
-
- function should_backup_file( $filepath ) {
- $vp = VaultPress::init();
- if ( is_dir( $filepath ) )
- $filepath = trailingslashit( $filepath );
- $regex_patterns = $vp->get_should_ignore_files();
- foreach ( $regex_patterns as $pattern ) {
- $matches = array();
- if ( preg_match( $pattern, $filepath, $matches ) ) {
- return false;
- }
- }
- return true;
- }
-
- function validate( $file ) {
- $rpath = realpath( $this->dir.$file );
- $dir = $this->dir;
- if ( !$rpath && '/wp-config.php' == $file ) {
- $dir = explode( DIRECTORY_SEPARATOR, $dir );
- array_pop( $dir );
- $dir = implode( DIRECTORY_SEPARATOR, $dir );
- $rpath = realpath( $dir . $file );
- }
- if ( !$rpath )
- die( serialize( array( 'type' => 'null', 'path' => $file ) ) );
- if ( is_dir( $rpath ) )
- $rpath = "$rpath/";
- if ( strpos( $rpath, $dir ) !== 0 )
- return false;
- return true;
- }
-
- function dir_examine( $subdir='', $recursive=true, $origin=false ) {
- $res = array();
- if ( !$subdir )
- $subdir='/';
- $dir = $this->dir . $subdir;
- if ( $origin === false )
- $origin = $this->dir . $subdir;
- if ( is_file($dir) ) {
- if ( $origin == $dir )
- $name = str_replace( $this->dir, '/', $subdir );
- else
- $name = str_replace( $origin, '/', $dir );
- $res[$name] = $this->stat( $dir.$entry );
- return $res;
- }
- $d = dir( $dir );
- if ( !$d )
- return $res;
- while ( false !== ( $entry = $d->read() ) ) {
- $rpath = realpath( $dir.$entry );
- $bname = basename( $rpath );
- if ( is_link( $dir.$entry ) )
- continue;
- if ( $entry == '.' || $entry == '..' || $entry == '...' )
- continue;
- if ( !$this->validate( $subdir.$entry ) )
- continue;
- $name = str_replace( $origin, '/', $dir.$entry );
- $res[$name] = $this->stat( $dir.$entry );
- if ( $recursive && is_dir( $this->dir.$subdir.'/'.$entry ) ) {
- $res = array_merge( $res, $this->dir_examine( $subdir.$entry.'/', $recursive, $origin ) );
- }
- }
- return $res;
- }
-
- function dir_checksum( $base, &$list, $recursive=true ) {
- if ( $list == null )
- $list = array();
-
- if ( 0 !== strpos( $base, $this->dir ) )
- $base = $this->dir . rtrim( $base, '/' );
-
- $shortbase = substr( $base, strlen( $this->dir ) );
- if ( !$shortbase )
- $shortbase = '/';
- $stat = stat( $base );
- $directories = array();
- $files = (array)$this->scan_dir( $base );
- array_push( $files, $base );
- foreach ( $files as $file ) {
- if ( $file !== $base && @is_dir( $file ) ) {
- $directories[] = $file;
- continue;
- }
- $stat = @stat( $file );
- if ( !$stat )
- continue;
- $shortstat = array();
- foreach( $this->keys as $key ) {
- if ( isset( $stat[$key] ) )
- $shortstat[$key] = $stat[$key];
- }
- $list[$shortbase][basename( $file )] = $shortstat;
- }
- $list[$shortbase] = md5( serialize( $list[$shortbase] ) );
- if ( !$recursive )
- return $list;
- foreach ( $directories as $dir ) {
- $this->dir_checksum( $dir, $list, $recursive );
- }
- return $list;
- }
-
- function scan_dir( $path ) {
- $files = array();
-
- if ( false === is_readable( $path ) ) {
- return array();
- }
-
- $dh = opendir( $path );
-
- if ( false === $dh ) {
- return array();
- }
-
- while ( false !== ( $file = readdir( $dh ) ) ) {
- if ( $file == '.' || $file == '..' ) continue;
- $files[] = "$path/$file";
- }
-
- closedir( $dh );
- sort( $files );
- return $files;
- }
-}
diff --git a/plugins/vaultpress/class.vaultpress-hotfixes.php b/plugins/vaultpress/class.vaultpress-hotfixes.php
deleted file mode 100644
index 4dbb12bb..00000000
--- a/plugins/vaultpress/class.vaultpress-hotfixes.php
+++ /dev/null
@@ -1,834 +0,0 @@
-r17994( $_POST );
- // Protect add_meta, update_meta used by the XML-RPC API
- add_filter( 'wp_xmlrpc_server_class', create_function( '$class', 'return \'VaultPress_XMLRPC_Server_r17994\';' ) );
-
- // clean post_mime_type and guid (r17994)
- add_filter( 'pre_post_mime_type', array( $this, 'r17994_sanitize_mime_type' ) );
- add_filter( 'post_mime_type', array( $this, 'r17994_sanitize_mime_type' ) );
- add_filter( 'pre_post_guid', 'esc_url_raw' );
- add_filter( 'post_guid', 'esc_url' );
- }
-
- if ( version_compare( $wp_version, '3.1.4', '<' ) ) {
- add_filter( 'wp_insert_post_data', array( $this, 'r18368' ), 1, 2 );
-
- // Add click jacking protection
- // login_init does not exist before 17826.
- $action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : 'login';
- add_action( 'login_form_' . $action, array( $this, 'r17826_send_frame_options_header' ), 10, 0 );
- add_action( 'admin_init', array( $this, 'r17826_send_frame_options_header' ), 10, 0 );
-
- add_filter( 'sanitize_option_WPLANG', array( $this, 'r18346_sanitize_lang_on_save' ) );
- add_filter( 'sanitize_option_new_admin_email', array( $this, 'r18346_sanitize_admin_email_on_save' ) );
- }
- add_filter( 'option_new_admin_email', array( $this, 'r18346_sanitize_admin_email' ) );
-
- if ( version_compare( $wp_version, '3.3.2', '<' ) ) {
- remove_filter( 'comment_text', 'make_clickable' );
- add_filter( 'comment_text', array( $this, 'r20493_make_clickable' ), 9 );
-
- add_filter( 'comment_post_redirect', array( $this, 'r20486_comment_post_redirect' ) );
- }
-
- // WooThemes < 3.8.3, foxypress, asset-manager, wordpress-member-private-conversation.
- $end_execution = false;
- if ( isset( $_SERVER['SCRIPT_FILENAME'] ) )
- foreach ( array( 'preview-shortcode-external.php', 'uploadify.php', 'doupload.php', 'cef-upload.php', 'upload.php' ) as $vulnerable_script )
- if ( $vulnerable_script == basename( $_SERVER['SCRIPT_FILENAME'] ) ) {
- switch( $vulnerable_script ) {
- case 'upload.php':
- $pma_config_file = realpath( dirname( $_SERVER['SCRIPT_FILENAME'] ) . DIRECTORY_SEPARATOR . 'paam-config-ajax.php' );
- if ( !in_array( $pma_config_file, get_included_files() ) )
- break;
- default:
- $end_execution = true;
- break 2;
- }
- }
- if ( $end_execution )
- die( 'Disabled for security reasons' );
-
- if ( version_compare( $wp_version, '3.3.2', '>') && version_compare( $wp_version, '3.4.1', '<' ) ) {
- add_filter( 'map_meta_cap', array( $this, 'r21138_xmlrpc_edit_posts' ), 10, 4 );
- add_action( 'map_meta_cap', array( $this, 'r21152_unfiltered_html' ), 10, 4 );
- }
-
- // https://core.trac.wordpress.org/changeset/21083
- if ( version_compare( $wp_version, '3.3', '>=') && version_compare( $wp_version, '3.3.3', '<' ) )
- add_filter( 'editable_slug', 'esc_textarea' );
-
- add_filter( 'get_pagenum_link', array( $this, 'get_pagenum_link' ) );
- }
-
- function r21138_xmlrpc_edit_posts( $caps, $cap, $user_id, $args ) {
- if ( ! isset( $args[0] ) || isset( $args[1] ) && $args[1] === 'hotfixed' )
- return $caps;
- foreach ( get_post_types( array(), 'objects' ) as $post_type_object ) {
- if ( $cap === $post_type_object->cap->edit_posts )
- return map_meta_cap( $post_type_object->cap->edit_post, $user_id, $args[0], 'hotfixed' );
- }
- return $caps;
- }
-
- function r21152_unfiltered_html( $caps, $cap, $user_id, $args ) {
- if ( $cap !== 'unfiltered_html' )
- return $caps;
- if ( defined( 'DISALLOW_UNFILTERED_HTML' ) && DISALLOW_UNFILTERED_HTML )
- return $caps;
- $key = array_search( 'do_not_allow', $caps );
- if ( false !== $key )
- return $caps;
- if ( is_multisite() && ! is_super_admin( $user_id ) )
- $caps[$key] = 'do_not_allow';
- return $caps;
- }
-
- function get_pagenum_link( $url ) {
- return esc_url_raw( $url );
- }
-
- function r20486_comment_post_redirect( $location ) {
- $location = wp_sanitize_redirect( $location );
- $location = wp_validate_redirect( $location, admin_url() );
-
- return $location;
- }
-
- function r20493_make_clickable( $text ) {
- $r = '';
- $textarr = preg_split( '/(<[^<>]+>)/', $text, -1, PREG_SPLIT_DELIM_CAPTURE ); // split out HTML tags
- foreach ( $textarr as $piece ) {
- if ( 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 ( $this->r20493_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 .= $this->r20493_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, array( $this, 'r20493_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( '#(]+?>|>)) ]+?>([^>]+?) #i', "$1$3", $r );
- return $r;
- }
-
- function r20493_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] . "$url " . $suffix;
- }
-
- function r20493_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;
- }
-
- function r16625( $query ) {
- // Hotfixes: http://core.trac.wordpress.org/changeset/16625
-
- // Punt as fast as possible if this isn't an UPDATE
- if ( substr( $query, 0, 6 ) != "UPDATE" )
- return $query;
- global $wpdb;
-
- // Determine what the prefix of the bad query would look like and punt if this query doesn't match
- $badstring = "UPDATE $wpdb->posts SET to_ping = TRIM(REPLACE(to_ping, '";
- if ( substr( $query, 0, strlen( $badstring ) ) != $badstring )
- return $query;
-
- // Pull the post_id which is the last thing in the origin query, after a space, no quotes
- $query_parts = explode( " ", $query );
- $post_id = array_pop( $query_parts );
-
- // Chop off the beginning and end of the original query to get our unsanitized $tb_ping
- $tb_ping = substr(
- $query,
- strlen( $badstring ),
- (
- strlen( $query ) - (
- strlen( $badstring ) + strlen( sprintf( "', '')) WHERE ID = %d", $post_id ) )
- )
- )
- );
-
- // Return the fixed query
- return $wpdb->prepare( "UPDATE $wpdb->posts SET to_ping = TRIM(REPLACE(to_ping, %s, '')) WHERE ID = %d", $tb_ping, $post_id );
- }
-
- function r16803( $xmlrpc_method ) {
- // Hotfixes: http://core.trac.wordpress.org/changeset/16803
- global $wp_xmlrpc_server;
- // Pretend that we are an xmlrpc method, freshly called
- $args = $wp_xmlrpc_server->message->params;
- $error_code = 401;
- switch( $xmlrpc_method ) {
- case 'metaWeblog.newPost':
- $content_struct = $args[3];
- $publish = isset( $args[4] ) ? $args[4] : 0;
- if ( !empty( $content_struct['post_type'] ) ) {
- if ( $content_struct['post_type'] == 'page' ) {
- if ( $publish || 'publish' == $content_struct['page_status'] )
- $cap = 'publish_pages';
- else
- $cap = 'edit_pages';
- $error_message = __( 'Sorry, you are not allowed to publish pages on this site.' );
- } elseif ( $content_struct['post_type'] == 'post' ) {
- if ( $publish || 'publish' == $content_struct['post_status'] )
- $cap = 'publish_posts';
- else
- $cap = 'edit_posts';
- $error_message = __( 'Sorry, you are not allowed to publish posts on this site.' );
- } else {
- $error_message = __( 'Invalid post type.' );
- }
- } else {
- if ( $publish || 'publish' == $content_struct['post_status'] )
- $cap = 'publish_posts';
- else
- $cap = 'edit_posts';
- $error_message = __( 'Sorry, you are not allowed to publish posts on this site.' );
- }
- if ( current_user_can( $cap ) )
- return true;
- break;
- case 'metaWeblog.editPost':
- $post_ID = (int) $args[0];
- $content_struct = $args[3];
- $publish = $args[4];
- $cap = ( $publish ) ? 'publish_posts' : 'edit_posts';
- $error_message = __( 'Sorry, you are not allowed to publish posts on this site.' );
- if ( !empty( $content_struct['post_type'] ) ) {
- if ( $content_struct['post_type'] == 'page' ) {
- if ( $publish || 'publish' == $content_struct['page_status'] )
- $cap = 'publish_pages';
- else
- $cap = 'edit_pages';
- $error_message = __( 'Sorry, you are not allowed to publish pages on this site.' );
- } elseif ( $content_struct['post_type'] == 'post' ) {
- if ( $publish || 'publish' == $content_struct['post_status'] )
- $cap = 'publish_posts';
- else
- $cap = 'edit_posts';
- $error_message = __( 'Sorry, you are not allowed to publish posts on this site.' );
- } else {
- $error_message = __( 'Invalid post type.' );
- }
- } else {
- if ( $publish || 'publish' == $content_struct['post_status'] )
- $cap = 'publish_posts';
- else
- $cap = 'edit_posts';
- $error_message = __( 'Sorry, you are not allowed to publish posts on this site.' );
- }
- if ( current_user_can( $cap ) )
- return true;
- break;
- case 'mt.publishPost':
- $post_ID = (int) $args[0];
- if ( current_user_can( 'publish_posts' ) && current_user_can( 'edit_post', $post_ID ) )
- return true;
- $error_message = __( 'Sorry, you cannot edit this post.' );
- break;
- case 'blogger.deletePost':
- $post_ID = (int) $args[1];
- if ( current_user_can( 'delete_post', $post_ID ) )
- return true;
- $error_message = __( 'Sorry, you do not have the right to delete this post.' );
- break;
- case 'wp.getPageStatusList':
- if ( current_user_can( 'edit_pages' ) )
- return true;
- $error_code = 403;
- $error_message = __( 'You are not allowed access to details about this site.' );
- break;
- case 'wp.deleteComment':
- case 'wp.editComment':
- $comment_ID = (int) $args[3];
- if ( !$comment = get_comment( $comment_ID ) )
- return true; // This will be handled in the calling function explicitly
- if ( current_user_can( 'edit_post', $comment->comment_post_ID ) )
- return true;
- $error_code = 403;
- $error_message = __( 'You are not allowed to moderate comments on this site.' );
- break;
- default:
- return true;
- }
- // If we are here then this was a handlable xmlrpc call and the capability checks above all failed
- // ( otherwise they would have returned to the do_action from the switch statement above ) so it's
- // time to exit with whatever error we've determined is the problem (thus short circuiting the
- // original XMLRPC method call, and enforcing the above capability checks -- with an ax. We'll
- // mimic the behavior from the end of IXR_Server::serve()
- $r = new IXR_Error( $error_code, $error_message );
- $resultxml = $r->getXml();
- $xml = <<
-
-
-
- $resultxml
-
-
-
-
-EOD;
- $wp_xmlrpc_server->output( $xml );
- // For good measure...
- die();
- }
-
- function r17172_esc_url( $url, $original_url, $_context ) {
- $url = $original_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 );
- }
-
- $protocols = array ('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn');
- if ( VaultPress_kses::wp_kses_bad_protocol( $url, $protocols ) != $url )
- return '';
- return $url;
- }
-
- // http://core.trac.wordpress.org/changeset/17172
- // http://core.trac.wordpress.org/changeset/20541
- function r17172_wp_kses( $string, $html, $protocols ) {
- return VaultPress_kses::wp_kses( $string, $html, $protocols );
- }
-
- // http://core.trac.wordpress.org/changeset/17990
- function r17990( $filename ) {
- $parts = explode('.', $filename);
- $filename = array_shift($parts);
- $extension = array_pop($parts);
- $mimes = get_allowed_mime_types();
-
- // Loop over any intermediate extensions. Munge 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;
- return $filename;
- }
-
- /*
- * Hotfixes: http://core.trac.wordpress.org/changeset/18368
- */
- function r18368( $post, $raw_post ) {
- if ( isset( $post['filter'] ) || isset ( $raw_post['filter'] ) ) {
- unset( $post['filter'], $raw_post['filter'] ); // to ensure the post is properly sanitized
- $post = sanitize_post($post, 'db');
- }
- if ( empty( $post['ID'] ) )
- unset( $post['ID'] ); // sanitize_post
- unset( $post['filter'] ); // sanitize_post
- return $post;
- }
-
- /**
- * Protect WordPress internal metadata.
- *
- * The post data is passed as a parameter to (unit) test this method.
- * @param $post_data|array the $_POST array.
- */
- function r17994( &$post_data ) {
- // Protect admin-ajax add_meta
- $metakeyselect = isset( $post_data['metakeyselect'] ) ? stripslashes( trim( $post_data['metakeyselect'] ) ) : '';
- $metakeyinput = isset( $post_data['metakeyinput'] ) ? stripslashes( trim( $post_data['metakeyinput'] ) ) : '';
-
- if ( ( $metakeyselect && '_' == $metakeyselect[0] ) || ( $metakeyinput && '_' == $metakeyinput[0] ) ) {
- unset( $_POST['metakeyselect'], $_POST['metakeyinput'] );
- }
-
- // Protect admin-ajax update_meta
- if ( isset( $post_data['meta'] ) ) {
- foreach ( (array)$post_data['meta'] as $mid => $value ) {
- $key = stripslashes( $post_data['meta'][$mid]['key'] );
- if ( $key && '_' == $key[0] )
- unset( $post_data['meta'][$mid] );
- }
- }
- }
-
- function r17994_sanitize_mime_type( $mime_type ) {
- $sani_mime_type = preg_replace( '/[^\-*.a-zA-Z0-9\/+]/', '', $mime_type );
- return apply_filters( 'sanitize_mime_type', $sani_mime_type, $mime_type );
- }
-
- function r17826_send_frame_options_header() {
- @header( 'X-Frame-Options: SAMEORIGIN' );
- }
-
- function r18346_sanitize_admin_email_on_save($value) {
- $value = sanitize_email( $value );
- if ( !is_email( $value ) ) {
- $value = get_option( 'new_admin_email' ); // Resets option to stored value in the case of failed sanitization
- if ( function_exists( 'add_settings_error' ) )
- add_settings_error( 'new_admin_email', 'invalid_admin_email', __( 'The email address entered did not appear to be a valid email address. Please enter a valid email address.' ) );
- }
- return $value;
- }
-
- function r18346_sanitize_admin_email( $value ) {
- return sanitize_email( $value ); // Is it enough ?
- }
-
- function r18346_sanitize_lang_on_save( $value ) {
- $value = $this->r18346_sanitize_lang( $value ); // sanitize the new value.
- if ( empty( $value ) )
- $value = get_option( 'WPLANG' );
- return $value;
- }
-
- function r18346_sanitize_lang( $value ) {
- $allowed = apply_filters( 'available_languages', get_available_languages() ); // add a filter to unit test
- if ( !empty( $value ) && !in_array( $value, $allowed ) )
- return false;
- else
- return $value;
- }
-}
-
-global $wp_version;
-$needs_class_fix = version_compare( $wp_version, '3.1', '>=') && version_compare( $wp_version, '3.1.3', '<' );
-if ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST && $needs_class_fix ) {
- include_once( ABSPATH . WPINC . '/class-IXR.php' );
- include_once( ABSPATH . WPINC . '/class-wp-xmlrpc-server.php' );
-
- class VaultPress_XMLRPC_Server_r17994 extends wp_xmlrpc_server {
- function set_custom_fields( $post_id, $fields ) {
- foreach( $fields as $k => $meta ) {
- $key = stripslashes( trim( $meta['key'] ) );
- if ( $key && '_' == $key[0] )
- unset( $fields[$k] );
- }
- parent::set_custom_fields( $post_id, $fields );
- }
- }
-}
-
-class VaultPress_kses {
- static function wp_kses($string, $allowed_html, $allowed_protocols = array ()) {
- $string = wp_kses_no_null($string);
- $string = wp_kses_js_entities($string);
- $string = wp_kses_normalize_entities($string);
- return VaultPress_kses::wp_kses_split($string, $allowed_html, $allowed_protocols);
- }
-
- static function wp_kses_split($string, $allowed_html, $allowed_protocols) {
- global $pass_allowed_html, $pass_allowed_protocols;
- $pass_allowed_html = $allowed_html;
- $pass_allowed_protocols = $allowed_protocols;
- return preg_replace_callback( '%(|$))|(<[^>]*(>|$)|>)%', 'VaultPress_kses::_vp_kses_split_callback', $string );
- }
-
- static function _vp_kses_split_callback( $match ) {
- global $pass_allowed_html, $pass_allowed_protocols;
- return VaultPress_kses::wp_kses_split2( $match[0], $pass_allowed_html, $pass_allowed_protocols );
- }
-
- static function wp_kses_split2($string, $allowed_html, $allowed_protocols) {
- $string = wp_kses_stripslashes($string);
-
- if (substr($string, 0, 1) != '<')
- return '>';
- # It matched a ">" character
-
- if ( ''), '', $string );
- while ( $string != ($newstring = VaultPress_kses::wp_kses($string, $allowed_html, $allowed_protocols)) )
- $string = $newstring;
- if ( $string == '' )
- return '';
- // prevent multiple dashes in comments
- $string = preg_replace('/--+/', '-', $string);
- // prevent three dashes closing a comment
- $string = preg_replace('/-$/', '', $string);
- return "";
- }
- # Allow HTML comments
-
- if (!preg_match('%^<\s*(/\s*)?([a-zA-Z0-9]+)([^>]*)>?$%', $string, $matches))
- return '';
- # It's seriously malformed
-
- $slash = trim($matches[1]);
- $elem = $matches[2];
- $attrlist = $matches[3];
-
- if ( ! isset($allowed_html[strtolower($elem)]) )
- return '';
- # They are using a not allowed HTML element
-
- if ($slash != '')
- return "$elem>";
- # No attributes are allowed for closing elements
-
- return VaultPress_kses::wp_kses_attr( $elem, $attrlist, $allowed_html, $allowed_protocols );
- }
-
- static function wp_kses_attr($element, $attr, $allowed_html, $allowed_protocols) {
- # Is there a closing XHTML slash at the end of the attributes?
-
- $xhtml_slash = '';
- if (preg_match('%\s*/\s*$%', $attr))
- $xhtml_slash = ' /';
-
- # Are any attributes allowed at all for this element?
- if ( ! isset($allowed_html[strtolower($element)]) || count($allowed_html[strtolower($element)]) == 0 )
- return "<$element$xhtml_slash>";
-
- # Split it
- $attrarr = VaultPress_kses::wp_kses_hair($attr, $allowed_protocols);
-
- # Go through $attrarr, and save the allowed attributes for this element
- # in $attr2
- $attr2 = '';
-
- $allowed_attr = $allowed_html[strtolower($element)];
- foreach ($attrarr as $arreach) {
- if ( ! isset( $allowed_attr[strtolower($arreach['name'])] ) )
- continue; # the attribute is not allowed
-
- $current = $allowed_attr[strtolower($arreach['name'])];
- if ( $current == '' )
- continue; # the attribute is not allowed
-
- if ( strtolower( $arreach['name'] ) == 'style' ) {
- $orig_value = $arreach['value'];
- $value = safecss_filter_attr( $orig_value );
-
- if ( empty( $value ) )
- continue;
-
- $arreach['value'] = $value;
- $arreach['whole'] = str_replace( $orig_value, $value, $arreach['whole'] );
- }
-
- if ( ! is_array($current) ) {
- $attr2 .= ' '.$arreach['whole'];
- # there are no checks
-
- } else {
- # there are some checks
- $ok = true;
- foreach ($current as $currkey => $currval) {
- if ( ! wp_kses_check_attr_val($arreach['value'], $arreach['vless'], $currkey, $currval) ) {
- $ok = false;
- break;
- }
- }
-
- if ( $ok )
- $attr2 .= ' '.$arreach['whole']; # it passed them
- } # if !is_array($current)
- } # foreach
-
- # Remove any "<" or ">" characters
- $attr2 = preg_replace('/[<>]/', '', $attr2);
-
- return "<$element$attr2$xhtml_slash>";
- }
-
- static function wp_kses_hair($attr, $allowed_protocols) {
- $attrarr = array ();
- $mode = 0;
- $attrname = '';
- $uris = array('xmlns', 'profile', 'href', 'src', 'cite', 'classid', 'codebase', 'data', 'usemap', 'longdesc', 'action');
-
- # Loop through the whole attribute list
-
- while (strlen($attr) != 0) {
- $working = 0; # Was the last operation successful?
-
- switch ($mode) {
- case 0 : # attribute name, href for instance
-
- if (preg_match('/^([-a-zA-Z]+)/', $attr, $match)) {
- $attrname = $match[1];
- $working = $mode = 1;
- $attr = preg_replace('/^[-a-zA-Z]+/', '', $attr);
- }
-
- break;
-
- case 1 : # equals sign or valueless ("selected")
-
- if (preg_match('/^\s*=\s*/', $attr)) # equals sign
- {
- $working = 1;
- $mode = 2;
- $attr = preg_replace('/^\s*=\s*/', '', $attr);
- break;
- }
-
- if (preg_match('/^\s+/', $attr)) # valueless
- {
- $working = 1;
- $mode = 0;
- if(false === array_key_exists($attrname, $attrarr)) {
- $attrarr[$attrname] = array ('name' => $attrname, 'value' => '', 'whole' => $attrname, 'vless' => 'y');
- }
- $attr = preg_replace('/^\s+/', '', $attr);
- }
-
- break;
-
- case 2 : # attribute value, a URL after href= for instance
-
- if (preg_match('%^"([^"]*)"(\s+|/?$)%', $attr, $match))
- # "value"
- {
- $thisval = $match[1];
- if ( in_array(strtolower($attrname), $uris) )
- $thisval = VaultPress_kses::wp_kses_bad_protocol($thisval, $allowed_protocols);
-
- if(false === array_key_exists($attrname, $attrarr)) {
- $attrarr[$attrname] = array ('name' => $attrname, 'value' => $thisval, 'whole' => "$attrname=\"$thisval\"", 'vless' => 'n');
- }
- $working = 1;
- $mode = 0;
- $attr = preg_replace('/^"[^"]*"(\s+|$)/', '', $attr);
- break;
- }
-
- if (preg_match("%^'([^']*)'(\s+|/?$)%", $attr, $match))
- # 'value'
- {
- $thisval = $match[1];
- if ( in_array(strtolower($attrname), $uris) )
- $thisval = VaultPress_kses::wp_kses_bad_protocol($thisval, $allowed_protocols);
-
- if(false === array_key_exists($attrname, $attrarr)) {
- $attrarr[$attrname] = array ('name' => $attrname, 'value' => $thisval, 'whole' => "$attrname='$thisval'", 'vless' => 'n');
- }
- $working = 1;
- $mode = 0;
- $attr = preg_replace("/^'[^']*'(\s+|$)/", '', $attr);
- break;
- }
-
- if (preg_match("%^([^\s\"']+)(\s+|/?$)%", $attr, $match))
- # value
- {
- $thisval = $match[1];
- if ( in_array(strtolower($attrname), $uris) )
- $thisval = VaultPress_kses::wp_kses_bad_protocol($thisval, $allowed_protocols);
-
- if(false === array_key_exists($attrname, $attrarr)) {
- $attrarr[$attrname] = array ('name' => $attrname, 'value' => $thisval, 'whole' => "$attrname=\"$thisval\"", 'vless' => 'n');
- }
- # We add quotes to conform to W3C's HTML spec.
- $working = 1;
- $mode = 0;
- $attr = preg_replace("%^[^\s\"']+(\s+|$)%", '', $attr);
- }
-
- break;
- } # switch
-
- if ($working == 0) # not well formed, remove and try again
- {
- $attr = wp_kses_html_error($attr);
- $mode = 0;
- }
- } # while
-
- if ($mode == 1 && false === array_key_exists($attrname, $attrarr))
- # special case, for when the attribute list ends with a valueless
- # attribute like "selected"
- $attrarr[$attrname] = array ('name' => $attrname, 'value' => '', 'whole' => $attrname, 'vless' => 'y');
-
- return $attrarr;
- }
-
- static function wp_kses_bad_protocol($string, $allowed_protocols) {
- $string = wp_kses_no_null($string);
- $iterations = 0;
-
- do {
- $original_string = $string;
- $string = VaultPress_kses::wp_kses_bad_protocol_once($string, $allowed_protocols);
- } while ( $original_string != $string && ++$iterations < 6 );
-
- if ( $original_string != $string )
- return '';
-
- return $string;
- }
-
- static function wp_kses_bad_protocol_once($string, $allowed_protocols, $count = 1) {
- $string2 = preg_split( '/:|*58;|*3a;/i', $string, 2 );
- if ( isset($string2[1]) && ! preg_match('%/\?%', $string2[0]) ) {
- $string = trim( $string2[1] );
- $protocol = VaultPress_kses::wp_kses_bad_protocol_once2( $string2[0], $allowed_protocols );
- if ( 'feed:' == $protocol ) {
- if ( $count > 2 )
- return '';
- $string = VaultPress_kses::wp_kses_bad_protocol_once( $string, $allowed_protocols, ++$count );
- if ( empty( $string ) )
- return $string;
- }
- $string = $protocol . $string;
- }
-
- return $string;
- }
-
- static function wp_kses_bad_protocol_once2( $string, $allowed_protocols ) {
- $string2 = wp_kses_decode_entities($string);
- $string2 = preg_replace('/\s/', '', $string2);
- $string2 = wp_kses_no_null($string2);
- $string2 = strtolower($string2);
-
- $allowed = false;
- foreach ( (array) $allowed_protocols as $one_protocol )
- if ( strtolower($one_protocol) == $string2 ) {
- $allowed = true;
- break;
- }
-
- if ($allowed)
- return "$string2:";
- else
- return '';
- }
-
-}
-
-if ( !function_exists( 'get_available_languages' ) ) {
- function get_available_languages( $dir = null ) {
- $languages = array();
- foreach( glob( ( is_null( $dir) ? WP_LANG_DIR : $dir ) . '/*.mo' ) as $lang_file )
- if ( false === strpos( $lang_file, 'continents-cities' ) )
- $languages[] = basename($lang_file, '.mo');
- return $languages;
- }
-}
diff --git a/plugins/vaultpress/class.vaultpress-ixr-ssl-client.php b/plugins/vaultpress/class.vaultpress-ixr-ssl-client.php
deleted file mode 100644
index 6921589e..00000000
--- a/plugins/vaultpress/class.vaultpress-ixr-ssl-client.php
+++ /dev/null
@@ -1,132 +0,0 @@
-IXR_Client( $server, $path, $port, $timeout );
- }
- function ssl( $port=443 ) {
- if ( !extension_loaded( 'openssl' ) )
- return;
-
- $this->ssl = true;
- if ( $port )
- $this->port = $port;
- }
- function query() {
- $args = func_get_args();
- $method = array_shift($args);
- $request = new IXR_Request($method, $args);
- $length = $request->getLength();
- $xml = $request->getXml();
- $r = "\r\n";
- $request = "POST {$this->path} HTTP/1.0$r";
-
- $this->headers['Host'] = preg_replace( '#^ssl://#', '', $this->server );
- $this->headers['Content-Type'] = 'text/xml';
- $this->headers['User-Agent'] = $this->useragent;
- $this->headers['Content-Length'] = $length;
-
- if ( class_exists( 'WP_Http' ) ) {
- $args = array(
- 'method' => 'POST',
- 'body' => $xml,
- 'headers' => $this->headers,
- 'sslverify' => false,
- );
- if ( $this->timeout )
- $args['timeout'] = $this->timeout;
-
- $http = new WP_Http();
- if ( $this->ssl )
- $url = sprintf( 'https://%s%s', $this->server, $this->path );
- else
- $url = sprintf( 'http://%s%s', $this->server, $this->path );
-
- $result = $http->request( $url, $args );
- if ( is_wp_error( $result ) ) {
- foreach( $result->errors as $type => $messages ) {
- $this->error = new IXR_Error(
- -32702,
- sprintf( 'WP_Http error: %s, %s', $type, $messages[0] )
- );
- break;
- }
- return false;
- } else if ( $result['response']['code'] > 299 || $result['response']['code'] < 200 ) {
- $this->error = new IXR_Error(
- -32701,
- sprintf( 'Server rejected request (HTTP response: %s %s)', $result['response']['code'], $result['response']['message'])
- );
- return false;
- }
- // Now parse what we've got back
- $this->message = new IXR_Message( $result['body'] );
- } else {
- foreach( $this->headers as $header => $value ) {
- $request .= "{$header}: {$value}{$r}";
- }
- $request .= $r;
-
- $request .= $xml;
- // Now send the request
- if ( $this->ssl )
- $host = 'ssl://'.$this->server;
- else
- $host = $this->server;
- if ($this->timeout) {
- $fp = @fsockopen( $host, $this->port, $errno, $errstr, $this->timeout );
- } else {
- $fp = @fsockopen( $host, $this->port, $errno, $errstr );
- }
- if (!$fp) {
- $this->error = new IXR_Error( -32300, "Transport error - could not open socket: $errno $errstr" );
- return false;
- }
- fputs( $fp, $request );
-
- $contents = '';
- $gotFirstLine = false;
- $gettingHeaders = true;
-
- while ( !feof($fp) ) {
- $line = fgets( $fp, 4096 );
- if ( !$gotFirstLine ) {
- // Check line for '200'
- if ( strstr($line, '200') === false ) {
- $this->error = new IXR_Error( -32301, 'transport error - HTTP status code was not 200' );
- return false;
- }
- $gotFirstLine = true;
- }
- if ( trim($line) == '' ) {
- $gettingHeaders = false;
- }
- if ( !$gettingHeaders ) {
- $contents .= trim( $line );
- }
- }
- // Now parse what we've got back
- $this->message = new IXR_Message( $contents );
- }
- if ( !$this->message->parse() ) {
- // XML error
- $this->error = new IXR_Error( -32700, 'parse error. not well formed' );
- return false;
- }
- // Is the message a fault?
- if ( $this->message->messageType == 'fault' ) {
- $this->error = new IXR_Error( $this->message->faultCode, $this->message->faultString );
- return false;
- }
- // Message must be OK
- return true;
- }
-}
diff --git a/plugins/vaultpress/cron-tasks.php b/plugins/vaultpress/cron-tasks.php
deleted file mode 100644
index d09ca301..00000000
--- a/plugins/vaultpress/cron-tasks.php
+++ /dev/null
@@ -1,150 +0,0 @@
- 300,
- 'display' => __( 'Once every five minutes' , 'vaultpress'),
- );
- return $schedules;
- }
-
- function _scan_site() {
- if ( !get_option( '_vp_current_scan' ) ) {
- $ignore_symlinks = get_option( '_vp_ignore_symlinks', false );
- $paths = array( 'root' => new VP_FileScan( ABSPATH, $ignore_symlinks ) );
-
- // Is WP_CONTENT_DIR inside ABSPATH?
- if ( is_dir( WP_CONTENT_DIR ) && strpos( realpath( WP_CONTENT_DIR ), realpath( ABSPATH ) . DIRECTORY_SEPARATOR ) !== 0 )
- $paths['content'] = new VP_FileScan( WP_CONTENT_DIR, $ignore_symlinks );
-
- // Is WP_PLUGIN_DIR inside ABSPATH or WP_CONTENT_DIR?
- if ( is_dir( WP_PLUGIN_DIR ) && strpos( realpath( WP_PLUGIN_DIR ), realpath( WP_CONTENT_DIR ) . DIRECTORY_SEPARATOR ) !== 0 && strpos( realpath( WP_PLUGIN_DIR ), realpath( ABSPATH ) . DIRECTORY_SEPARATOR ) !== 0 )
- $paths['plugins'] = new VP_FileScan( WP_PLUGIN_DIR, $ignore_symlinks );
-
- // Is WPMU_PLUGIN_DIR inside ABSPATH or WP_CONTENT_DIR?
- if ( is_dir( WPMU_PLUGIN_DIR ) && strpos( realpath( WPMU_PLUGIN_DIR ), realpath( WP_CONTENT_DIR ) . DIRECTORY_SEPARATOR ) !== 0 && strpos( realpath( WPMU_PLUGIN_DIR ), realpath( ABSPATH ) . DIRECTORY_SEPARATOR ) !== 0 )
- $paths['mu-plugins'] = new VP_FileScan( WPMU_PLUGIN_DIR, $ignore_symlinks );
-
- update_option( '_vp_current_scan', $paths );
- }
- }
-
- function _scan_clean_up( &$paths, $type = null ) {
- if( is_array( $paths ) )
- unset( $paths[$type] );
- if ( empty( $paths ) || !is_array( $paths ) ) {
- delete_option( '_vp_current_scan' );
- return true;
- }
- return false;
- }
-
- function _scan_batch() {
- $paths = get_option( '_vp_current_scan' );
- if ( empty( $paths ) || $this->_scan_clean_up( $paths ) )
- return false;
-
- reset( $paths );
- list( $type, $current ) = each( $paths );
- if ( !is_object( $current ) || empty( $current->last_dir ) )
- return $this->_scan_clean_up( $paths, $type );
-
- $default_batch_limit = 400;
- if ( function_exists( 'set_time_limit' ) )
- set_time_limit(0);
- else
- $default_batch_limit = 100; // avoid timeouts
-
- $GLOBALS['vp_signatures'] = get_option( '_vp_signatures' );
- if ( empty( $GLOBALS['vp_signatures'] ) )
- return false;
-
- $limit = get_option( '_vp_batch_file_size', $default_batch_limit );
- $files = $current->get_files( $limit );
-
- // No more files to scan.
- if ( !$current->last_dir || count( $files ) < $limit )
- unset( $paths[$type] );
-
- update_option( '_vp_current_scan', $paths );
- $results = array();
- foreach ( $files as $file ) {
- $verdict = vp_scan_file( $file );
- if ( !empty( $verdict ) )
- $results[$file] = array( 'hash' => @md5_file( $file ), 'verdict' => $verdict );
- }
-
- if ( !empty( $results ) ) {
- $vaultpress = VaultPress::init();
- $vaultpress->add_ping( 'security', array( 'suspicious_v2' => $results ) );
- }
- }
-
- static function &init() {
- static $instance = false;
- if ( !$instance )
- $instance = new VP_Site_Scanner();
- return $instance;
- }
-}
-VP_Site_Scanner::init();
diff --git a/plugins/vaultpress/images/dashboard-icon-sprite-2x.png b/plugins/vaultpress/images/dashboard-icon-sprite-2x.png
deleted file mode 100644
index de1d7c3b..00000000
Binary files a/plugins/vaultpress/images/dashboard-icon-sprite-2x.png and /dev/null differ
diff --git a/plugins/vaultpress/images/dashboard-icon-sprite.png b/plugins/vaultpress/images/dashboard-icon-sprite.png
deleted file mode 100644
index e8a65b30..00000000
Binary files a/plugins/vaultpress/images/dashboard-icon-sprite.png and /dev/null differ
diff --git a/plugins/vaultpress/images/logo_plugin-notice.png b/plugins/vaultpress/images/logo_plugin-notice.png
deleted file mode 100644
index 9c9b13f4..00000000
Binary files a/plugins/vaultpress/images/logo_plugin-notice.png and /dev/null differ
diff --git a/plugins/vaultpress/images/noise.png b/plugins/vaultpress/images/noise.png
deleted file mode 100644
index d8d10909..00000000
Binary files a/plugins/vaultpress/images/noise.png and /dev/null differ
diff --git a/plugins/vaultpress/images/plugin-shield-2x.png b/plugins/vaultpress/images/plugin-shield-2x.png
deleted file mode 100644
index 237996e5..00000000
Binary files a/plugins/vaultpress/images/plugin-shield-2x.png and /dev/null differ
diff --git a/plugins/vaultpress/images/plugin-shield.png b/plugins/vaultpress/images/plugin-shield.png
deleted file mode 100644
index f8bf33ff..00000000
Binary files a/plugins/vaultpress/images/plugin-shield.png and /dev/null differ
diff --git a/plugins/vaultpress/images/vp-icon-sprite-2x.png b/plugins/vaultpress/images/vp-icon-sprite-2x.png
deleted file mode 100644
index 36846c21..00000000
Binary files a/plugins/vaultpress/images/vp-icon-sprite-2x.png and /dev/null differ
diff --git a/plugins/vaultpress/images/vp-icon-sprite.png b/plugins/vaultpress/images/vp-icon-sprite.png
deleted file mode 100644
index e525eaec..00000000
Binary files a/plugins/vaultpress/images/vp-icon-sprite.png and /dev/null differ
diff --git a/plugins/vaultpress/images/vp-toolbar-icon-trans-2x.png b/plugins/vaultpress/images/vp-toolbar-icon-trans-2x.png
deleted file mode 100644
index 0cb57e61..00000000
Binary files a/plugins/vaultpress/images/vp-toolbar-icon-trans-2x.png and /dev/null differ
diff --git a/plugins/vaultpress/images/vp-toolbar-icon-trans.png b/plugins/vaultpress/images/vp-toolbar-icon-trans.png
deleted file mode 100644
index 757b0bb4..00000000
Binary files a/plugins/vaultpress/images/vp-toolbar-icon-trans.png and /dev/null differ
diff --git a/plugins/vaultpress/nav-styles.css b/plugins/vaultpress/nav-styles.css
deleted file mode 100644
index d94ba2e0..00000000
--- a/plugins/vaultpress/nav-styles.css
+++ /dev/null
@@ -1,19 +0,0 @@
-#toplevel_page_vaultpress div.wp-menu-image {
- background: url(images/vp-icon-sprite.png) center top no-repeat;
- background-size: 28px 84px;
-}
-
-.admin-color-classic #toplevel_page_vaultpress div.wp-menu-image {
- background-position: center -28px;
-}
-
-#toplevel_page_vaultpress.current div.wp-menu-image,
-#toplevel_page_vaultpress:hover div.wp-menu-image {
- background-position: center bottom;
-}
-
-@media only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 3/2), only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5) {
- #toplevel_page_vaultpress div.wp-menu-image {
- background-image: url(images/vp-icon-sprite-2x.png);
- }
-}
diff --git a/plugins/vaultpress/readme.txt b/plugins/vaultpress/readme.txt
deleted file mode 100644
index b0004896..00000000
--- a/plugins/vaultpress/readme.txt
+++ /dev/null
@@ -1,86 +0,0 @@
-=== VaultPress ===
-Contributors: automattic, apokalyptik, briancolinger, josephscott, shaunandrews, xknown, thingalon
-Tags: security, malware, virus, backups, scanning
-Requires at least: 2.9.2
-Tested up to: 3.8
-Stable tag: 1.5.1
-License: GPLv2
-
-VaultPress is a subscription service offering realtime backup, automated security scanning, and support from WordPress experts.
-
-== Description ==
-
-[VaultPress](http://vaultpress.com/?utm_source=plugin-readme&utm_medium=description&utm_campaign=1.0) is a real-time backup and security scanning service designed and built by [Automattic](http://automattic.com/), the same company that operates 25+ million sites on WordPress.com.
-
-The VaultPress plugin provides the required functionality to backup and synchronize every post, comment, media file, revision and dashboard settings on our servers. To start safeguarding your site, you need to sign up for a VaultPress subscription.
-
-[wpvideo TxdSIdpO]
-
-For more information, check out [VaultPress.com](http://vaultpress.com/).
-
-== Installation ==
-
-1. Search for VaultPress in the WordPress.org plugin directory and click install. Or, upload the files to your `wp-content/vaultpress/` folder.
-2. Visit `wp-admin/plugins.php` and activate the VaultPress plugin.
-3. Head to `wp-admin/admin.php?page=vaultpress` and enter your site’s registration key. You can purchase your registration key at [VaultPress.com](http://vaultpress.com/plugin/?utm_source=plugin-readme&utm_medium=installation&utm_campaign=1.0)
-
-You can find more detailed instructions at [http://vaultpress.com/](http://help.vaultpress.com/install-vaultpress/?utm_source=plugin-readme&utm_medium=description&utm_campaign=1.0)
-
-== Frequently Asked Questions ==
-
-View our full list of FAQs at [http://help.vaultpress.com/faq/](http://help.vaultpress.com/faq/?utm_source=plugin-readme&utm_medium=faq&utm_campaign=1.0)
-
-= What’s included in each VaultPress plan? =
-
-All plans include Daily or Realtime Backups, Downloadable Archives for Restoring, Vitality Statistics, and the Activity Log.
-
-The Lite plan provides Daily Backups, a 30-day backup archive and automated restores.
-
-The Basic plan provides Realtime Backups to protect your changes as they happen and support services.
-
-The Premium plan provides priority recovery and support services, along with site migration assistance. The Premium plan provides automated security scanning of Core, Theme, and Plugin files.
-
-Update-to-date pricing and features can always be found on the [Plans & Pricing](http://vaultpress.com/plugin/?utm_source=plugin-readme&utm_medium=installation&utm_campaign=1.0) page.
-
-= How many sites can I protect with VaultPress? =
-
-A VaultPress subscription is for a single WordPress site. You can purchase additional subscriptions for each of your WordPress sites, and manage them all with in one place.
-
-= Does VaultPress work with WordPress 3.0 Multisite installs? =
-
-Yes, VaultPress supports Multisite installs. Each site will require its own subscription.
-
-== Changelog ==
-= 1.5.1 =
-* Feature: Adding file exclusion patterns to avoid backing up cache and backup directories.
-
-= 1.5 =
-* Bugfix: Don't show admin notices on the about page.
-
-= 1.4.9 =
-* Bugfix: Clean up PHP5 strict warnings.
-
-= 1.4.8 =
-* Feature: Include styles and images with the plugin instead of loading them externally.
-
-= 1.4.7 =
-* Bugfix: Some servers have SSL configuration problems, which breaks the plugin when SSL verification is enforced.
-
-= 1.4.6 =
-* Bugfix: PHP 5.4 notices
-* Feature: Add the possibility to ignore frequent updates on some postmeta keys.
-
-= 1.3.9 =
-* Feature: Request decoding (base64/rot13)
-* Feature: Response encoding (base64/rot13)
-
-= 1.3.8 =
-* Bugfix: Validate IPv4-mapped IPv6 addresses in the internal firewall.
-* Bugfix: Fix hooks not being properly added under certain circumstances.
-
-= 1.3.7 =
-* Bugfix: Protect against infinite loop due to a PHP bug.
-* Bugfix: Encode remote ping requests.
-
-= 1.0 =
-* First public release!
diff --git a/plugins/vaultpress/styles.css b/plugins/vaultpress/styles.css
deleted file mode 100644
index c0d07791..00000000
--- a/plugins/vaultpress/styles.css
+++ /dev/null
@@ -1,682 +0,0 @@
-/* --- Misc --- */
-.clrfix { zoom:1; }
-.clrfix:after { content:".";display:block;height:0;width:0;line-height:0;clear:both;visibility:hidden; }
-
-/* --- Structure --- */
-#vp-wrap {
-}
-
-/* --- Old Plugin Head 0.x --- */
-#vp-head {
- padding: 10px 0;
-}
-#vp-head:after {
- content: "."; display: block; height: 0; clear: both; visibility: hidden;
-}
-#vp-head h2 a.vp-visit-dashboard {
- position: absolute;
- top: 27px;
- right: 15px;
- -webkit-font-smoothing: antialiased;
- font-weight: bold;
- float: right;
- text-shadow: none;
- font-size: 13px;
- line-height: 100%;
- padding: 5px 15px 7px 15px;
- text-decoration: none;
- color: #999;
- border: 1px solid #CCC;
- border: 1px solid rgba(0,0,0,0.3);
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- box-shadow: 0 1px 0 rgba(0,0,0,0.1);
-}
-#vp-head a.vp-visit-dashboard:hover {
- background: #0098C4;
- color: #FFF;
- border-color: rgba(0,0,0,0.3);
- box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 1px 0 rgba(0,0,0,0.1);
-}
-#vp-head a.vp-visit-dashboard:active {
- color: rgba(255,255,255,0.6);
- box-shadow: inset 0 2px 2px rgba(0,0,0,0.2);
- top: 28px;
-}
-#vp-head h2 {
- float: left;
- height: 32px;
- background: url(images/plugin-shield.png) 0 7px no-repeat;
- background-size: 31px 32px;
- font-size: 23px;
- padding: 11px 15px 4px 40px;
- line-height: 29px;
-}
-#vp-head .updated {
- clear: left;
-}
-
-/* --- Header 1.x --- */
-#icon-vaultpress {
- background: url(images/plugin-shield.png) 0 0 no-repeat;
-}
-
-
-/* --- Notices --- */
-#vp-notice {
- clear: both;
- display: block;
- background: #343434 url(images/logo_plugin-notice.png) 15px 17px no-repeat;
- border: 1px solid rgba(0,0,0,0.5);
- box-shadow: 0 2px 1px rgba(0,0,0,0.1);
- padding: 20px 15px 20px 55px;
- margin: 10px 0;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;;
-}
-#vp-notice:after {
- content: "."; display: block; height: 0; clear: both; visibility: hidden;
-}
-
- #vp-notice .vp-message {
- color: #FFF;
- -webkit-font-smoothing: antialiased;
- }
- #vp-notice .vp-message h3 {
- font-size: 20px;
- font-weight: normal;
- font-family: HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', Arial, Helvetica, sans-serif;
- margin: 0 0 10px 0;
- }
- #vp-notice .vp-message p {
- margin: 0;
- padding: 0;
- font-size: 12px;
- line-height: 180%;
- }
- #vp-notice .vp-message a {
- padding: 3px 10px;
- text-decoration: none;
- color: #CCC;
- border: 1px solid #FFF;
- border: 1px solid rgba(255,255,255,0.3);
- -webkit-border-radius: 10px;
- -moz-border-radius: 10px;
- border-radius: 10px;
- box-shadow: 0 1px 0 rgba(0,0,0,0.1);
- }
- #vp-notice .vp-message a:hover {
- background: #0098C4;
- color: #FFF;
- border-color: rgba(0,0,0,0.3);
- box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
- }
- #vp-notice .vp-message a:active {
- color: rgba(255,255,255,0.6);
- box-shadow: inset 0 2px 2px rgba(0,0,0,0.2);
- position: relative;
- top: 1px;
- }
-
-#vp-notice.vp-error {
- background-color: #AB0300;
-}
- #vp-notice.vp-error a { color: #FFF; }
- #vp-notice.vp-error a:hover { background: #333; box-shadow: inset 0 1px 0 rgba(255,255,255,0.1) }
- #vp-notice.vp-error a:active { }
-
-
-/* --- Remote Access Notice --- */
-#no-access-credentials {
- clear: both;
- background: #FBFBDF;
- padding: 1px 25px;
- margin: 0 0 20px 0;
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- clear: both;
- -webkit-border-top-left-radius: 4px;
- -webkit-border-top-right-radius: 4px;
- -moz-border-radius-topleft: 4px;
- -moz-border-radius-topright: 4px;
- border-top-left-radius: 4px;
- border-top-right-radius: 4px;
- -webkit-background-clip: padding-box;
- -webkit-font-smoothing: antialiased;
-}
-#no-access-credentials p {
- font-size: 14px;
- color: #333;
- text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
- text-align: left;
- padding-left: 42px;
- line-height: 32px;
- background: url(images/dashboard-icon-sprite.png) no-repeat -270px -391px;
- background-size: 300px 420px;
-}
-
-
-/* --- Toolbar --- */
-#wpadminbar #wp-admin-bar-vp-notice a {
- padding: 0 4px;
-}
-#wpadminbar #wp-admin-bar-vp-notice strong {
- float: left;
- margin-top: 3px;
- padding: 1px 7px 0 5px;
- background-color: #ff9a00;
- color: #fff;
- color: rgba(255,255,255,0.9);
- font-size: 12px;
- text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
- line-height: 21px;
- text-shadow: none;
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
- overflow: hidden;
- height: 21px;
-}
-
-#wpadminbar #wp-admin-bar-vp-notice a:active strong {
- position: relative;
- top: 1px;
- box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
-}
-
-#wpadminbar #wp-admin-bar-vp-notice.error strong {
- background-color: #ac0300;
-}
-
-#wpadminbar #wp-admin-bar-vp-notice strong .ab-icon {
- width: 16px;
- height: 21px;
- margin: 0 6px 0 0;
- background: transparent url(images/vp-toolbar-icon-trans.png) no-repeat 0 2px;
- background-size: 16px;
-}
-
-
-/* gray hover */
-/*
-#wpadminbar #wp-admin-bar-vp-notice a:hover strong {
- background-color: #333;
- -webkit-box-shadow: inset 0px 1px 1px 0px rgba(0, 0, 0, .4);
- -moz-box-shadow: inset 0px 1px 1px 0px rgba(0, 0, 0, .4);
- box-shadow: inset 0px 1px 1px 0px rgba(0, 0, 0, .4);
- border-bottom: 1px solid #444;
-}
-*/
-
-/* reset hover state */
-
-#wpadminbar #wp-admin-bar-vp-notice a.ab-item:hover {
- background-image: none;
- background-color: #222;
-}
-
-
-/* --- Status Ticker --- */
-#vp-ticker {
- margin: 0 0 20px 0;
- padding: 8px 8px;
- position: relative;
- top: 0px;
- border-top: 1px solid #CCC;
- border-bottom: 1px solid #CCC;
- background: #EFEFEF url(images/noise.png) repeat 0 0;
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- -webkit-font-smoothing: antialiased;
-}
-#vp-ticker h3 {
- margin: 0;
- padding: 0 5px 0 0;
- font-size: 13px;
- line-height: 1em;
- color: #999;
- display: inline;
- font-style: normal;
- text-shadow: 0 1px 0 #FFF;
- font-weight: bold;
-
- -webkit-font-smoothing: antialiased;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
-}
-#vp-ticker p {
- margin: 0;
- padding: 0;
- display: inline;
- font-size: 13px;
- line-height: 1em;
- color: #000;
- text-shadow: none;
-}
-
-
-/* --- Tabs --- */
-#vp-tabs {
- /* IE 7 specific */
- *position: relative;
- *z-index: 1;
-}
-#vp-tabs .menu-tabs {
- float: left;
- height: 28px;
- line-height: 28px;
- margin: 0 5px 0 0;
- padding: 0 8px;
- border-width: 1px 1px 1px;
- border-style: solid;
- border-color: #ddd #ddd #fff;
- font-size: 13px;
- color: #818181;
- background-color: #fff;
- text-decoration: none;
- text-shadow: #fff 0px 1px 0px;
- text-transform: uppercase;
- font-family: "Lucida Grande", Lucida, Helvetica, Verdana, Arial, sans-serif;
-}
-#vp-tabs .menu-tab-inactive {
- border-color: #ddd;
- background-color: #ededed;
- color: #21759b;
-}
-#vp-tabs .menu-tab-inactive:hover {
- text-decoration: underline;
-}
-#vp-tab-content {
- min-width: 568px;
- max-width: 1000px;
- margin-top: -1px;
- padding: 20px;
- border: 1px solid #ddd;
- background-color: #fff;
-}
-#vp-tab-content .label {
- padding-left: 8px;
-}
-#vp-totals table td {
- border-top: #ececec 1px solid;
- padding: 3px 0;
- white-space: nowrap;
-}
-#vp-totals table tr.first td {
- border-top: none;
-}
-#vp-totals td.b {
- padding-right: 6px;
- text-align: right;
- font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
- font-size: 18px;
-}
-#vp-totals .t {
- font-size: 12px;
- padding-right: 12px;
- padding-top: 6px;
- color: #777;
-}
-#vp-totals td.first,
-#vp-totals td.last {
- width: 1%;
-}
-#vp-totals .col1 {
- float: left;
- width: 45%;
- margin-right: 1em;
-}
-#vp-totals p,
-#vp-activity p {
- margin-top: 0;
- color: #333;
- font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
- font-size: 16px;
-}
-#vp-totals p em {
- color: #666;
- font-size: 13px;
- font-style: italic;
-}
-#vp-totals .col2 {
- float: left;
- width: 25%;
-}
-#vp-totals .col3 {
- float: right;
- width: 25%;
-}
-#vp-totals p {
- clear: both;
- width: 100%;
-}
-#vp-activity td {
- padding: 12px 8px;
- color: #666;
- font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
- font-size: 13px;
- vertical-align: middle;
-}
-#vp-activity td .ago {
- color: #000;
- font-size: 1.2em;
-}
-#vp-activity td.date {
- width: 1%;
- padding-right: 15px;
- white-space: nowrap;
-}
-
-
-
-/* --- Not Registered/Activated --- */
-#vp_registration {
- clear: both;
- position: relative;
- margin: 10px 0 20px 0;
- -webkit-font-smoothing: antialiased;
-}
-#vp_registration:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
-
-#vp_registration .vp_view-plans {
- background: #333 url(images/noise.png) repeat 0 0;
- color: #FFF;
- float: left;
- width: 360px;
- padding: 20px 30px 30px 30px;
- margin-right: 30px;
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
-}
-#vp_registration .vp_view-plans h1 {
- font-size: 24px;
- font-weight: normal;
- font-family: HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', Arial, Helvetica, sans-serif;
- margin: 0 0 10px 0;
- line-height: 140%;
-}
-#vp_registration .vp_view-plans h1 strong {}
-#vp_registration .vp_view-plans p {
- color: #CCC;
- font-size: 15px;
- line-height: 140%;
- margin: 0 0 25px 0;
-}
-#vp_registration .vp_view-plans h5 strong {}
-#vp_registration .vp_view-plans p.vp_plans-btn {
- position: relative;
- left: -5px;
-}
-#vp_registration .vp_view-plans p.vp_plans-btn a {
- float: left;
- padding: 4px;
- background-color: rgba(0,0,0,0.8);
- background-color: #000;
- -webkit-border-radius: 30px;
- -moz-border-radius: 30px;
- border-radius: 30px;
- text-decoration: none;
- color: #FFF;
- font-size: 13px;
- text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
-}
-#vp_registration .vp_view-plans p.vp_plans-btn a:hover {}
-#vp_registration .vp_view-plans p.vp_plans-btn a:active {}
-#vp_registration .vp_view-plans p.vp_plans-btn a strong {
- background: #0090BA;
- padding: 10px 55px;
- float: left;
- border: 1px solid rgba(0, 0, 0, 0.4);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
- -moz-border-radius: 30px;
- -webkit-border-radius: 30px;
- border-radius: 30px;
- -webkit-background-clip: padding-box;
- text-decoration: none;
- color: white;
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size: 16px;
- font-weight: normal;
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
- background: -moz-linear-gradient(top, #10C3EF 0%, #10A6CC 3%, #039BC1 43%, #009AC4 46%, #0084A5 100%);
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #10C3EF), color-stop(3%, #10A6CC), color-stop(43%, #039BC1), color-stop(46%, #009AC4), color-stop(100%, #0084A5));
- background: -webkit-linear-gradient(top, #10C3EF 0%, #10A6CC 3%, #039BC1 43%, #009AC4 46%, #0084A5 100%);
- background: -o-linear-gradient(top, #10C3EF 0%, #10A6CC 3%, #039BC1 43%, #009AC4 46%, #0084A5 100%);
- background: -ms-linear-gradient(top, #10C3EF 0%, #10A6CC 3%, #039BC1 43%, #009AC4 46%, #0084A5 100%);
- background: linear-gradient(top, #10C3EF 0%, #10A6CC 3%, #039BC1 43%, #009AC4 46%, #0084A5 100%);
-}
-#vp_registration .vp_view-plans p.vp_plans-btn a strong b { font-weight: bold; }
-#vp_registration .vp_view-plans p.vp_plans-btn a:hover strong {
- box-shadow: 0 3px 4px #000;
- text-decoration: underline;
-}
-#vp_registration .vp_view-plans p.vp_plans-btn a:active strong {
- background: #007ca0; /* Old browsers */
- background: -moz-linear-gradient(top, #007ca0 0%, #7db9e8 100%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#007ca0), color-stop(100%,#7db9e8)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #007ca0 0%,#7db9e8 100%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #007ca0 0%,#7db9e8 100%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #007ca0 0%,#7db9e8 100%); /* IE10+ */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#007ca0', endColorstr='#7db9e8',GradientType=0 ); /* IE6-9 */
- background: linear-gradient(top, #007ca0 0%,#7db9e8 100%); /* W3C */
-}
-
-#vp_registration .vp_register-plugin {
- float: left;
- padding: 50px 0 0 0;
-}
-#vp_registration .vp_register-plugin h3 {
- font-size: 15px;
- color: #333;
- text-shadow: 0 1px 0 #FFF;
- margin: 0 0 5px 0;
-}
-#vp_registration .vp_register-plugin p {
- margin: 0 0 15px 0;
- color: #666;
-}
-#vp_registration .vp_register-plugin fieldset {}
-#vp_registration .vp_register-plugin textarea {
- display: block;
- width: 350px;
- height: 60px;
- border: 1px solid #999;
- box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
- padding: 5px;
- font-size: 14px;
- font-family: Georgia, Constantia, "Palatino Linotype", "Book Antiqua", serif;;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
-}
-#vp_registration .vp_register-plugin button {
- -webkit-font-smoothing: antialiased;
- float: left;
- font-family: HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', Arial, Helvetica, sans-serif;
- padding: 0;
- border: none !important;
- background: transparent;
- text-decoration: none;
- color: #333;
- font-size: 13px;
- text-shadow: 0 1px 0 #FFF;
- cursor: pointer;
- position: relative;
- top: 10px;
- left: -4px;
-}
-#vp_registration .vp_register-plugin button strong {
- float: left;
- padding: 7px 25px;
- border: 1px solid #999;
- -webkit-border-radius: 30px;
- -moz-border-radius: 30px;
- border-radius: 30px;
-
- background: #ffffff; /* Old browsers */
- background: -moz-linear-gradient(top, #ffffff 0%, #dddddd 100%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#dddddd)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #ffffff 0%,#dddddd 100%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #ffffff 0%,#dddddd 100%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #ffffff 0%,#dddddd 100%); /* IE10+ */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#dddddd',GradientType=0 ); /* IE6-9 */
- background: linear-gradient(top, #ffffff 0%,#dddddd 100%); /* W3C */
-}
-#vp_registration .vp_register-plugin button strong:active { background: #CCC; position: relative; top: 1px; }
-
-
-
-/* Progress Bars */
-#vp_progress {
- font-family: Helvetica, Arial, Sans-serif;
-}
-#vp_progress:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
-
-#vp_progress .vp_graphs {
- background: #333 url(images/noise.png) repeat 0 0;
- color: #FFF;
- float: left;
- width: 380px;
- padding: 0;
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
- -webkit-font-smoothing: antialiased;
-}
-#vp_progress .vp_graphs:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
-
-#vp_progress .vp_graphs h1 {
- color: #FFF;
- text-shadow: 0 -1px 0 rgba(0,0,0,0.4);
- padding: 20px 30px 20px 30px;
- margin: 0;
- border-bottom: 1px solid rgba(255,255,255,0.05);
-
- font-size: 24px;
- font-weight: normal;
- font-family: HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', Arial, Helvetica, sans-serif;
- line-height: 140%;
-}
-#vp_progress .vp_graphs ul {
- padding: 0 0 5px 0;
- float: left;
- width: 380px;
- background: rgba(0,0,0,0.1);
-}
-#vp_progress .vp_graphs ul li {
- float: left;
- clear: both;
- margin: 0;
- width: 320px;
- padding: 15px 30px;
- line-height: 100%;
- border-top: 1px solid rgba(0,0,0,0.3);
- border-bottom: 1px solid rgba(255,255,255,0.05);
-}
-#vp_progress .vp_graphs ul li.completed { }
-#vp_progress .vp_graphs ul li.completed .bar { }
-#vp_progress .vp_graphs ul li.completed .bar span {
- background: rgb(41,154,11);
- background: -moz-linear-gradient(top, rgba(41,154,11,1) 0%, rgba(41,154,11,1) 100%);
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(41,154,11,1)), color-stop(100%,rgba(41,154,11,1)));
- background: -webkit-linear-gradient(top, rgba(41,154,11,1) 0%,rgba(41,154,11,1) 100%);
- background: -o-linear-gradient(top, rgba(41,154,11,1) 0%,rgba(41,154,11,1) 100%);
- background: -ms-linear-gradient(top, rgba(41,154,11,1) 0%,rgba(41,154,11,1) 100%);
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#299a0b', endColorstr='#299a0b',GradientType=0 );
- background: linear-gradient(top, rgba(41,154,11,1) 0%,rgba(41,154,11,1) 100%);
-}
-#vp_progress .vp_graphs ul li.completed .percentage,
-#vp_progress .vp_graphs ul li.completed .title {
- color: #FFF;
-}
-
-#vp_progress .bar {
- float: left;
- width: 215px;
- padding: 4px;
- background: #252525 url(images/noise.png) repeat 0 0;
- margin: 0 5px 0 0;
- border: 1px solid rgba(255,255,255,0.1);
- -webkit-border-radius: 20px;
- -moz-border-radius: 20px;
- border-radius: 20px;
- box-shadow: inset 0 1px 1px rgba(0,0,0,0.6);
-}
-#vp_progress .bar span {
- float: left;
- height: 22px;
-
- background: #63b6db;
- background: -moz-linear-gradient(top, #63b6db 0%, #309dcf 100%);
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#63b6db), color-stop(100%,#309dcf));
- background: -webkit-linear-gradient(top, #63b6db 0%,#309dcf 100%);
- background: -o-linear-gradient(top, #63b6db 0%,#309dcf 100%);
- background: -ms-linear-gradient(top, #63b6db 0%,#309dcf 100%);
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#63b6db', endColorstr='#309dcf',GradientType=0 );
- background: linear-gradient(top, #63b6db 0%,#309dcf 100%);
-
-
- box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
-
- -webkit-border-radius: 20px;
- -moz-border-radius: 20px;
- border-radius: 20px;
-}
-#vp_progress .percentage {
- float: right;
- position: relative;
- top: 10px;
- margin: 0;
- width: 30px;
- text-align: right;
- font-size: 11px;
- font-weight: bold;
- color: #999;
-}
-#vp_progress .title {
- float: left;
- width: 60px;
- position: relative;
- top: 10px;
- font-size: 12px;
- color: #CCC;
-}
-
-#vp_progress .vp_progress-description {
- margin: 0 0 0 400px;
- padding: 20px 20px 0 20px;
-}
-#vp_progress .vp_progress-description h3 {
- font-size: 12px;
- color: #AAA;
-}
-#vp_progress .vp_progress-description ul {
- margin: 0 0 20px 0;
-}
-#vp_progress .vp_progress-description li {
- list-style: square;
- color: #777;
- margin: 0 0 15px 0;
- font-size: 12px;
- line-height: 160%;
-}
-#vp_progress .vp_progress-description li strong {
- color: #555;
-}
-#vp_progress .vp_progress-description p {
- font-size: 12px;
- color: #999;
- font-style: italic;
- line-height: 160%;
- margin: 0 0 30px 0;
-}
-
-
-@media only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 3, '/', 2), only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5) {
- #vp-head h2 { background-image: url(images/plugin-shield-2x.png); }
- #no-access-credentials p { background-image: url(images/dashboard-icon-sprite-2x.png); }
- #wpadminbar #wp-admin-bar-vp-notice strong .ab-icon { background-image: url(images/vp-toolbar-icon-trans-2x.png); }
-}
\ No newline at end of file
diff --git a/plugins/vaultpress/vaultpress.php b/plugins/vaultpress/vaultpress.php
deleted file mode 100644
index f9bc5b3d..00000000
--- a/plugins/vaultpress/vaultpress.php
+++ /dev/null
@@ -1,2220 +0,0 @@
-realtime backup and automated security scanning from VaultPress . Activate, enter your registration key, and never worry again. Need some help?
- * Version: 1.5.1
- * Author: Automattic
- * Author URI: http://vaultpress.com/?utm_source=author-uri&utm_medium=plugin-description&utm_campaign=1.0
- * License: GPL2+
- * Text Domain: vaultpress
- * Domain Path: /languages/
- */
-
-// don't call the file directly
-if ( !defined( 'ABSPATH' ) )
- return;
-
-class VaultPress {
- var $option_name = 'vaultpress';
- var $db_version = 3;
- var $plugin_version = '1.5.1';
-
- function __construct() {
- register_activation_hook( __FILE__, array( $this, 'activate' ) );
- register_deactivation_hook( __FILE__, array( $this, 'deactivate' ) );
-
- $options = get_option( $this->option_name );
- if ( !is_array( $options ) )
- $options = array();
-
- $defaults = array(
- 'db_version' => 0,
- 'key' => '',
- 'secret' => '',
- 'connection' => false,
- 'service_ips' => false
- );
-
- $this->options = wp_parse_args( $options, $defaults );
- $this->reset_pings();
-
- $this->upgrade();
-
- if ( is_admin() )
- $this->add_admin_actions_and_filters();
-
- if ( $this->is_registered() ) {
- $do_not_backup = $this->get_option( 'do_not_backup' ) || $this->get_option( 'do_not_send_backup_pings' );
- if ( $do_not_backup )
- $this->add_vp_required_filters();
- else
- $this->add_listener_actions_and_filters();
- }
- }
-
- static function &init() {
- static $instance = false;
-
- if ( !$instance ) {
- $instance = new VaultPress();
- }
-
- return $instance;
- }
-
- function activate( $network_wide ) {
- $type = $network_wide ? 'network' : 'single';
- $this->update_option( 'activated', $type );
-
- // force a connection check after an activation
- $this->clear_connection();
- }
-
- function deactivate() {
- if ( $this->is_registered() )
- $this->contact_service( 'plugin_status', array( 'vp_plugin_status' => 'deactivated' ) );
- }
-
- function upgrade() {
- $current_db_version = $this->get_option( 'db_version' );
-
- if ( $current_db_version < 1 ) {
- $this->options['connection'] = get_option( 'vaultpress_connection' );
- $this->options['key'] = get_option( 'vaultpress_key' );
- $this->options['secret'] = get_option( 'vaultpress_secret' );
- $this->options['service_ips'] = get_option( 'vaultpress_service_ips' );
-
- // remove old options
- $old_options = array(
- 'vaultpress_connection',
- 'vaultpress_hostname',
- 'vaultpress_key',
- 'vaultpress_secret',
- 'vaultpress_service_ips',
- 'vaultpress_timeout',
- 'vp_allow_remote_execution',
- 'vp_debug_request_signing',
- 'vp_disable_firewall',
- );
-
- foreach ( $old_options as $option )
- delete_option( $option );
-
- $this->options['db_version'] = $this->db_version;
- $this->update_options();
- }
-
- if ( $current_db_version < 2 ) {
- $this->delete_option( 'timeout' );
- $this->delete_option( 'disable_firewall' );
- $this->update_option( 'db_version', $this->db_version );
- $this->clear_connection();
- }
-
- if ( $current_db_version < 3 ) {
- $this->update_firewall();
- $this->update_option( 'db_version', $this->db_version );
- $this->clear_connection();
- }
- }
-
- function get_option( $key ) {
- if ( 'hostname' == $key ) {
- if ( defined( 'VAULTPRESS_HOSTNAME' ) )
- return VAULTPRESS_HOSTNAME;
- else
- return 'vaultpress.com';
- }
-
- if ( 'timeout' == $key ) {
- if ( defined( 'VAULTPRESS_TIMEOUT' ) )
- return VAULTPRESS_TIMEOUT;
- else
- return 60;
- }
-
- if ( 'disable_firewall' == $key ) {
- if ( defined( 'VAULTPRESS_DISABLE_FIREWALL' ) )
- return VAULTPRESS_DISABLE_FIREWALL;
- else
- return false;
- }
-
- if ( isset( $this->options[$key] ) )
- return $this->options[$key];
-
- return false;
- }
-
- function update_option( $key, $value ) {
- $this->options[$key] = $value;
- $this->update_options();
- }
-
- function delete_option( $key ) {
- unset( $this->options[$key] );
- $this->update_options();
- }
-
- function update_options() {
- update_option( $this->option_name, $this->options );
- }
-
- function admin_init() {
- if ( !current_user_can( 'manage_options' ) )
- return;
-
- load_plugin_textdomain( 'vaultpress', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
- }
-
- function admin_head() {
- if ( !current_user_can( 'manage_options' ) )
- return;
-
- if ( $activated = $this->get_option( 'activated' ) ) {
- if ( 'network' == $activated ) {
- add_action( 'network_admin_notices', array( $this, 'activated_notice' ) );
- } else {
- foreach ( array( 'user_admin_notices', 'admin_notices' ) as $filter )
- add_action( $filter, array( $this, 'activated_notice' ) );
- }
- }
-
- // ask the user to connect their site w/ VP
- if ( !$this->is_registered() ) {
- foreach ( array( 'user_admin_notices', 'admin_notices' ) as $filter )
- add_action( $filter, array( $this, 'connect_notice' ) );
-
- // if we have an error make sure to let the user know about it
- } else {
- $error_code = $this->get_option( 'connection_error_code' );
- if ( !empty( $error_code ) ) {
- foreach ( array( 'user_admin_notices', 'admin_notices' ) as $filter )
- add_action( $filter, array( $this, 'error_notice' ) );
- }
- }
- }
-
- function admin_menu() {
- // if Jetpack is loaded then we need to wait for that menu to be added
- if ( class_exists( 'Jetpack' ) )
- add_action( 'jetpack_admin_menu', array( $this, 'load_menu' ) );
- else
- $this->load_menu();
- }
-
- function load_menu() {
- if ( class_exists( 'Jetpack' ) ) {
- $hook = add_submenu_page( 'jetpack', 'VaultPress', 'VaultPress', 'manage_options', 'vaultpress', array( $this, 'ui' ) );
- } else {
- $hook = add_menu_page( 'VaultPress', 'VaultPress', 'manage_options', 'vaultpress', array( $this, 'ui' ), 'div' );
- }
-
- add_action( "load-$hook", array( $this, 'ui_load' ) );
- add_action( 'admin_print_styles', array( $this, 'styles' ) );
- }
-
- function styles() {
- if ( !current_user_can( 'manage_options' ) || !is_admin() )
- return;
-
- wp_enqueue_style( 'vaultpress-nav', plugins_url( '/nav-styles.css', __FILE__ ), false, date( 'Ymd' ) );
-
- if ( isset( $_GET['page'] ) && 'vaultpress' == $_GET['page'] )
- wp_enqueue_style( 'vaultpress', plugins_url( '/styles.css', __FILE__ ), false, date( 'Ymd' ) );
- }
-
- // display a security threat notice if one exists
- function toolbar( $wp_admin_bar ) {
- global $wp_version;
-
- // these new toolbar functions were introduced in 3.3
- // http://codex.wordpress.org/Function_Reference/add_node
- if ( version_compare( $wp_version, '3.3', '<') )
- return;
-
- if ( !current_user_can( 'manage_options' ) )
- return;
-
- $messages = $this->get_messages();
- if ( !empty( $messages['security_notice_count'] ) ) {
- $count = (int)$messages['security_notice_count'];
- if ( $count > 0 ) {
- $count = number_format( $count, 0 );
- $wp_admin_bar->add_node( array(
- 'id' => 'vp-notice',
- 'title' => ' ' .
- sprintf( _n( '%s Security Threat', '%s Security Threats', $count , 'vaultpress'), $count ) .
- ' ',
- 'parent' => 'top-secondary',
- 'href' => sprintf( 'https://dashboard.vaultpress.com/%d/security/', $messages['site_id'] ),
- 'meta' => array(
- 'title' => __( 'Visit VaultPress Security' , 'vaultpress'),
- 'onclick' => 'window.open( this.href ); return false;',
- 'class' => 'error'
- ),
- ) );
- }
- }
- }
-
- // get any messages from the VP servers
- function get_messages( $force_reload = false ) {
- $last_contact = $this->get_option( 'messages_last_contact' );
-
- // only run the messages check every 30 minutes
- if ( ( time() - (int)$last_contact ) > 1800 || $force_reload ) {
- $messages = base64_decode( $this->contact_service( 'messages', array() ) );
- $messages = unserialize( $messages );
- $this->update_option( 'messages_last_contact', time() );
- $this->update_option( 'messages', $messages );
- } else {
- $messages = $this->get_option( 'messages' );
- }
-
- return $messages;
- }
-
- function server_url() {
- if ( !isset( $this->_server_url ) ) {
- $scheme = is_ssl() ? 'https' : 'http';
- $this->_server_url = sprintf( '%s://%s/', $scheme, $this->get_option( 'hostname' ) );
- }
-
- return $this->_server_url;
- }
-
- // show message if plugin is activated but not connected to VaultPress
- function connect_notice() {
- if ( isset( $_GET['page'] ) && 'vaultpress' == $_GET['page'] )
- return;
-
- $message = sprintf(
- __( 'You must enter your registration key before VaultPress can back up and secure your site. Register VaultPress ', 'vaultpress' ),
- admin_url( 'admin.php?page=vaultpress' )
- );
- $this->ui_message( $message, 'notice', __( 'VaultPress needs your attention!', 'vaultpress' ) );
- }
-
- // show message after activation
- function activated_notice() {
- if ( 'network' == $this->get_option( 'activated' ) ) {
- $message = sprintf(
- __( 'Each site will need to be registered with VaultPress separately. You can purchase new keys from your VaultPress Dashboard .', 'vaultpress' ),
- 'https://dashboard.vaultpress.com/'
- );
- $this->ui_message( $message, 'activated', __( 'VaultPress has been activated across your network!', 'vaultpress' ) );
-
- // key and secret already exist in db
- } elseif ( $this->is_registered() ) {
- if ( $this->check_connection() ) {
- $message = sprintf(
- __( 'VaultPress has been registered and is currently backing up your site. View Backup Status ', 'vaultpress' ),
- admin_url( 'admin.php?page=vaultpress' )
- );
- $this->ui_message( $message, 'registered', __( 'VaultPress has been activated!', 'vaultpress' ) );
- }
- }
-
- $this->delete_option( 'activated' );
- }
-
- function error_notice() {
- $error_message = $this->get_option( 'connection_error_message' );
-
- // link to the VaultPress page if we're not already there
- if ( !isset( $_GET['page'] ) || 'vaultpress' != $_GET['page'] )
- $error_message .= ' ' . sprintf( '%s ', admin_url( 'admin.php?page=vaultpress' ), __( 'Visit the VaultPress page' , 'vaultpress') );
-
- $screen = get_current_screen();
- if ( !in_array( $screen->id, array( 'about', 'about-user', 'about-network' ) ) && !empty( $error_message ) )
- $this->ui_message( $error_message, 'error' );
- }
-
- function ui() {
- if ( !empty( $_GET['error'] ) ) {
- $this->error_notice();
- $this->clear_connection();
- }
-
- if ( !$this->is_registered() ) {
- $this->ui_register();
- return;
- }
-
- $status = $this->contact_service( 'status' );
- if ( !$status ) {
- $error_code = $this->get_option( 'connection_error_code' );
- if ( 0 == $error_code )
- $this->ui_fatal_error();
- else
- $this->ui_register();
- return;
- }
-
- $ticker = $this->contact_service( 'ticker' );
- if ( is_array( $ticker ) && isset( $ticker['faultCode'] ) ) {
- $this->error_notice();
- $this->ui_register();
- return;
- }
-
- $this->ui_main();
- }
-
- function ui_load() {
- if ( !current_user_can( 'manage_options' ) )
- return;
-
- // run code that might be updating the registration key
- if ( isset( $_POST['action'] ) && 'register' == $_POST['action'] ) {
- check_admin_referer( 'vaultpress_register' );
-
- // reset the connection info so messages don't cross
- $this->clear_connection();
-
- $registration_key = trim( $_POST[ 'registration_key' ] );
- if ( empty( $registration_key ) ) {
- $this->update_option( 'connection_error_code', 1 );
- $this->update_option(
- 'connection_error_message',
- sprintf(
- __( 'That\'s not a valid registration key. Head over to the VaultPress Dashboard to find your key.', 'vaultpress' ),
- 'https://dashboard.vaultpress.com/'
- )
- );
- wp_redirect( admin_url( 'admin.php?page=vaultpress&error=true' ) );
- exit();
- }
-
- // try to register the plugin
- $nonce = wp_create_nonce( 'vp_register_' . $registration_key );
- $args = array( 'registration_key' => $registration_key, 'nonce' => $nonce );
- $response = $this->contact_service( 'register', $args );
-
- // we received an error from the VaultPress servers
- if ( !empty( $response['faultCode'] ) ) {
- $this->update_option( 'connection_error_code', $response['faultCode'] );
- $this->update_option( 'connection_error_message', $response['faultString'] );
- wp_redirect( admin_url( 'admin.php?page=vaultpress&error=true' ) );
- exit();
- }
-
- // make sure the returned data looks valid
- if ( empty( $response['key'] ) || empty( $response['secret'] ) || empty( $response['nonce'] ) || $nonce != $response['nonce'] ) {
- $this->update_option( 'connection_error_code', 1 );
- $this->update_option( 'connection_error_message', sprintf( __( 'There was a problem trying to register your subscription. Please try again. If you’re still having issues please contact the VaultPress Safekeepers .', 'vaultpress' ), 'http://vaultpress.com/contact/' ) );
- wp_redirect( admin_url( 'admin.php?page=vaultpress&error=true' ) );
- exit();
- }
-
- // need to update these values in the db so the servers can try connecting to the plugin
- $this->update_option( 'key', $response['key'] );
- $this->update_option( 'secret', $response['secret'] );
- if ( $this->check_connection( true ) ) {
- wp_redirect( admin_url( 'admin.php?page=vaultpress' ) );
- exit();
- }
-
- // reset the key and secret
- $this->update_option( 'key', '' );
- $this->update_option( 'secret', '' );
- wp_redirect( admin_url( 'admin.php?page=vaultpress&error=true' ) );
- exit();
- }
- }
-
- function ui_register() {
-?>
-
-
-
-
-
-
requires a monthly subscription.', 'vaultpress' ); ?>
-
-
-
-
-
-
-
-
-
- contact_service( 'plugin_ui' ) );
- echo $response;
- ?>
-
-
-
-
VaultPress
-
-
get_option( 'hostname' ) ) ); ?>
-
contact the VaultPress Safekeepers.', 'vaultpress' ), 'http://vaultpress.com/contact/' ); ?>
-
-
-
-get_option_name_ignore( true );
- update_option( '_vp_config_option_name_ignore', $val );
- break;
- case '_vp_config_post_meta_name_ignore':
- $val = $this->get_post_meta_name_ignore( true );
- update_option( '_vp_config_post_meta_name_ignore', $val );
- break;
- case '_vp_config_should_ignore_files':
- $val = $this->get_should_ignore_files( true );
- update_option( '_vp_config_should_ignore_files', $val );
- break;
- }
- return $val;
- }
-
- // Option name patterns to ignore
- function get_option_name_ignore( $return_defaults = false ) {
- $defaults = array(
- 'vaultpress',
- 'cron',
- 'wpsupercache_gc_time',
- 'rewrite_rules',
- 'akismet_spam_count',
- '/_transient_/',
- '/^_vp_/',
- );
- if ( $return_defaults )
- return $defaults;
- $ignore_names = $this->get_config( '_vp_config_option_name_ignore' );
- return array_unique( array_merge( $defaults, $ignore_names ) );
- }
-
- // post meta name patterns to ignore
- function get_post_meta_name_ignore( $return_defaults = false ) {
- $defaults = array(
- 'pvc_views'
- );
- if ( $return_defaults )
- return $defaults;
- $ignore_names = $this->get_config( '_vp_config_post_meta_name_ignore' );
- return array_unique( array_merge( $defaults, $ignore_names ) );
- }
-
- // file name patterns to ignore
- function get_should_ignore_files( $return_defaults = false ) {
- $defaults = array(
- '@.*/404\.log\.txt$@',
- '@.*/\.DS_Store$@',
- '@.*/debug\.log$@',
- '@.*\.timthumb\.txt$@',
- '@.*timthumb[A-Za-z0-9]*$@',
- '@.*wp-content/contents/cache/@',
- '@.*wp-content/content/cache/@',
- '@.*wp-content/cache/@',
- '@.*wp-content/old-cache/@',
- '@.*cache/@',
- '@.*wp-content/w3tc/@',
- '@.*owa/owa-data/caches/@',
- '@.*gt-cache@',
- '@.*/wpclicks/tracker/cache/@',
- '@.*amember/data/new_rewrite@',
- '@.*sucuri/blocks/@',
- '@.*/_sucuribackup.*@',
- '@.*sess_[0-9a-zA-Z]{32,}@',
- '@.*wp-content/backups.*@',
- '@.*wp-content/backupwordpress@',
- '@.*wp-content/backup-[0-9a-zA-Z]+@',
- '@.*wp-content/[0-9a-zA-Z]+-backups@',
- '@.*mwp_backups/@',
- '@.*managewp/backups/@',
- '@.*wp-snapshots/@',
- '@.*error_log.*@',
- '@.*/error-log.*@',
- '@.*/error\.log$@',
- '@.*/captcha/tmp.*@',
- '@.*\.mt_backup_[0-9a-z:_]*$@i',
- '@.*vp-uploaded-restore-.*@',
- );
- if ( $return_defaults )
- return $defaults;
- $ignore_names = (array) $this->get_config( '_vp_config_should_ignore_files' );
- return array_unique( array_merge( $defaults, $ignore_names ) );
- }
-
- ###
- ### Section: Backup Notification Hooks
- ###
-
- // Handle Handle Notifying VaultPress of Options Activity At this point the options table has already been modified
- //
- // Note: we handle deleted, instead of delete because VaultPress backs up options by name (which are unique,) that
- // means that we do not need to resolve an id like we would for, say, a post.
- function option_handler( $option_name ) {
- global $wpdb;
- // Step 1 -- exclusionary rules, don't send these options to vaultpress, because they
- // either change constantly and/or are inconsequential to the blog itself and/or they
- // are specific to the VaultPress plugin process and we want to avoid recursion
- $should_ping = true;
- $ignore_names = $this->get_option_name_ignore();
- foreach( (array)$ignore_names as $val ) {
- if ( $val{0} == '/' ) {
- if ( preg_match( $val, $option_name ) )
- $should_ping = false;
- } else {
- if ( $val == $option_name )
- $should_ping = false;
- }
- if ( !$should_ping )
- break;
- }
- if ( $should_ping )
- $this->add_ping( 'db', array( 'option' => $option_name ) );
-
- // Step 2 -- If WordPress is about to kick off a some "cron" action, we need to
- // flush vaultpress, because the "remote" cron threads done via http fetch will
- // be happening completely inside the window of this thread. That thread will
- // be expecting touched and accounted for tables
- if ( $option_name == '_transient_doing_cron' )
- $this->do_pings();
-
- return $option_name;
- }
-
- // Handle Notifying VaultPress of Comment Activity
- function comment_action_handler( $comment_id ) {
- if ( !is_array( $comment_id ) ) {
- if ( wp_get_comment_status( $comment_id ) != 'spam' )
- $this->add_ping( 'db', array( 'comment' => $comment_id ) );
- } else {
- foreach ( $comment_id as $id ) {
- if ( wp_get_comment_status( $comment_id ) != 'spam' )
- $this->add_ping( 'db', array( 'comment' => $id) );
- }
- }
- }
-
- // Handle Notifying VaultPress of Theme Switches
- function theme_action_handler( $theme ) {
- $this->add_ping( 'themes', array( 'theme' => get_option( 'stylesheet' ) ) );
- }
-
- // Handle Notifying VaultPress of Upload Activity
- function upload_handler( $file ) {
- $this->add_ping( 'uploads', array( 'upload' => str_replace( $this->resolve_upload_path(), '', $file['file'] ) ) );
- return $file;
- }
-
- // Handle Notifying VaultPress of Plugin Activation/Deactivation
- function plugin_action_handler( $plugin='' ) {
- $this->add_ping( 'plugins', array( 'name' => $plugin ) );
- }
-
- // Handle Notifying VaultPress of User Edits
- function userid_action_handler( $user_or_id ) {
- if ( is_object($user_or_id) )
- $userid = intval( $user_or_id->ID );
- else
- $userid = intval( $user_or_id );
- if ( !$userid )
- return;
- $this->add_ping( 'db', array( 'user' => $userid ) );
- }
-
- // Handle Notifying VaultPress of term changes
- function term_handler( $term_id, $tt_id=null ) {
- $this->add_ping( 'db', array( 'term' => $term_id ) );
- if ( $tt_id )
- $this->term_taxonomy_handler( $tt_id );
- }
-
- // Handle Notifying VaultPress of term_taxonomy changes
- function term_taxonomy_handler( $tt_id ) {
- $this->add_ping( 'db', array( 'term_taxonomy' => $tt_id ) );
- }
- // add(ed)_term_taxonomy handled via the created_term hook, the term_taxonomy_handler is called by the term_handler
-
- // Handle Notifying VaultPress of term_taxonomy changes
- function term_taxonomies_handler( $tt_ids ) {
- foreach( (array)$tt_ids as $tt_id ) {
- $this->term_taxonomy_handler( $tt_id );
- }
- }
-
- // Handle Notifying VaultPress of term_relationship changes
- function term_relationship_handler( $object_id, $term_id ) {
- $this->add_ping( 'db', array( 'term_relationship' => array( 'object_id' => $object_id, 'term_taxonomy_id' => $term_id ) ) );
- }
-
- // Handle Notifying VaultPress of term_relationship changes
- function term_relationships_handler( $object_id, $term_ids ) {
- foreach ( (array)$term_ids as $term_id ) {
- $this->term_relationship_handler( $object_id, $term_id );
- }
- }
-
- // Handle Notifying VaultPress of term_relationship changes
- function set_object_terms_handler( $object_id, $terms, $tt_ids ) {
- $this->term_relationships_handler( $object_id, $tt_ids );
- }
-
- // Handle Notifying VaultPress of UserMeta changes
- function usermeta_action_handler( $umeta_id, $user_id, $meta_key, $meta_value='' ) {
- $this->add_ping( 'db', array( 'usermeta' => $umeta_id ) );
- }
-
- // Handle Notifying VaultPress of Post Changes
- function post_action_handler($post_id) {
- if ( current_filter() == 'delete_post' )
- return $this->add_ping( 'db', array( 'post' => $post_id ), 'delete_post' );
- return $this->add_ping( 'db', array( 'post' => $post_id ), 'edit_post' );
- }
-
- // Handle Notifying VaultPress of Link Changes
- function link_action_handler( $link_id ) {
- $this->add_ping( 'db', array( 'link' => $link_id ) );
- }
-
- // Handle Notifying VaultPress of Commentmeta Changes
- function commentmeta_insert_handler( $meta_id, $comment_id=null ) {
- if ( empty( $comment_id ) || wp_get_comment_status( $comment_id ) != 'spam' )
- $this->add_ping( 'db', array( 'commentmeta' => $meta_id ) );
- }
-
- function commentmeta_modification_handler( $meta_id, $object_id, $meta_key, $meta_value ) {
- if ( !is_array( $meta_id ) )
- return $this->add_ping( 'db', array( 'commentmeta' => $meta_id ) );
- foreach ( $meta_id as $id ) {
- $this->add_ping( 'db', array( 'commentmeta' => $id ) );
- }
- }
-
- // Handle Notifying VaultPress of PostMeta changes via newfangled metadata functions
- function postmeta_insert_handler( $meta_id, $post_id, $meta_key, $meta_value='' ) {
- if ( in_array( $meta_key, $this->get_post_meta_name_ignore() ) )
- return;
-
- $this->add_ping( 'db', array( 'postmeta' => $meta_id ) );
- }
-
- function postmeta_modification_handler( $meta_id, $object_id, $meta_key, $meta_value ) {
- if ( in_array( $meta_key, $this->get_post_meta_name_ignore() ) )
- return;
-
- if ( !is_array( $meta_id ) )
- return $this->add_ping( 'db', array( 'postmeta' => $meta_id ) );
- foreach ( $meta_id as $id ) {
- $this->add_ping( 'db', array( 'postmeta' => $id ) );
- }
- }
-
- // Handle Notifying VaultPress of PostMeta changes via old school cherypicked hooks
- function postmeta_action_handler( $meta_id, $post_id = null, $meta_key = null ) {
- if ( in_array( $meta_key, $this->get_post_meta_name_ignore() ) )
- return;
-
- if ( !is_array($meta_id) )
- return $this->add_ping( 'db', array( 'postmeta' => $meta_id ) );
- foreach ( $meta_id as $id )
- $this->add_ping( 'db', array( 'postmeta' => $id ) );
- }
-
- function verify_table( $table ) {
- global $wpdb;
- $status = $wpdb->get_row( $wpdb->prepare( "SHOW TABLE STATUS WHERE Name = %s", $table ) );
- if ( !$status || !$status->Update_time || !$status->Comment || $status->Engine != 'MyISAM' )
- return true;
- if ( preg_match( '/([0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2})/', $status->Comment, $m ) )
- return ( $m[1] == $status->Update_time );
- return false;
- }
-
- // Emulate $wpdb->last_table
- function record_table( $table ) {
- global $vaultpress_last_table;
- $vaultpress_last_table = $table;
- return $table;
- }
-
- // Emulate $wpdb->last_table
- function get_last_table() {
- global $wpdb, $vaultpress_last_table;
- if ( is_object( $wpdb ) && isset( $wpdb->last_table ) )
- return $wpdb->last_table;
- return $vaultpress_last_table;
- }
-
- // Emulate hyperdb::is_write_query()
- function is_write_query( $q ) {
- $word = strtoupper( substr( trim( $q ), 0, 20 ) );
- if ( 0 === strpos( $word, 'SELECT' ) )
- return false;
- if ( 0 === strpos( $word, 'SHOW' ) )
- return false;
- if ( 0 === strpos( $word, 'CHECKSUM' ) )
- return false;
- return true;
- }
-
- // Emulate hyperdb::get_table_from_query()
- function get_table_from_query( $q ) {
- global $wpdb, $vaultpress_last_table;
-
- if ( is_object( $wpdb ) && method_exists( $wpdb, "get_table_from_query" ) )
- return $wpdb->get_table_from_query( $q );
-
- // Remove characters that can legally trail the table name
- $q = rtrim( $q, ';/-#' );
- // allow ( select... ) union [...] style queries. Use the first queries table name.
- $q = ltrim( $q, "\t (" );
-
- // Quickly match most common queries
- if ( preg_match( '/^\s*(?:'
- . 'SELECT.*?\s+FROM'
- . '|INSERT(?:\s+IGNORE)?(?:\s+INTO)?'
- . '|REPLACE(?:\s+INTO)?'
- . '|UPDATE(?:\s+IGNORE)?'
- . '|DELETE(?:\s+IGNORE)?(?:\s+FROM)?'
- . ')\s+`?(\w+)`?/is', $q, $maybe) )
- return $this->record_table($maybe[1] );
-
- // Refer to the previous query
- if ( preg_match( '/^\s*SELECT.*?\s+FOUND_ROWS\(\)/is', $q ) )
- return $this->get_last_table();
-
- // Big pattern for the rest of the table-related queries in MySQL 5.0
- if ( preg_match( '/^\s*(?:'
- . '(?:EXPLAIN\s+(?:EXTENDED\s+)?)?SELECT.*?\s+FROM'
- . '|INSERT(?:\s+LOW_PRIORITY|\s+DELAYED|\s+HIGH_PRIORITY)?(?:\s+IGNORE)?(?:\s+INTO)?'
- . '|REPLACE(?:\s+LOW_PRIORITY|\s+DELAYED)?(?:\s+INTO)?'
- . '|UPDATE(?:\s+LOW_PRIORITY)?(?:\s+IGNORE)?'
- . '|DELETE(?:\s+LOW_PRIORITY|\s+QUICK|\s+IGNORE)*(?:\s+FROM)?'
- . '|DESCRIBE|DESC|EXPLAIN|HANDLER'
- . '|(?:LOCK|UNLOCK)\s+TABLE(?:S)?'
- . '|(?:RENAME|OPTIMIZE|BACKUP|RESTORE|CHECK|CHECKSUM|ANALYZE|OPTIMIZE|REPAIR).*\s+TABLE'
- . '|TRUNCATE(?:\s+TABLE)?'
- . '|CREATE(?:\s+TEMPORARY)?\s+TABLE(?:\s+IF\s+NOT\s+EXISTS)?'
- . '|ALTER(?:\s+IGNORE)?\s+TABLE'
- . '|DROP\s+TABLE(?:\s+IF\s+EXISTS)?'
- . '|CREATE(?:\s+\w+)?\s+INDEX.*\s+ON'
- . '|DROP\s+INDEX.*\s+ON'
- . '|LOAD\s+DATA.*INFILE.*INTO\s+TABLE'
- . '|(?:GRANT|REVOKE).*ON\s+TABLE'
- . '|SHOW\s+(?:.*FROM|.*TABLE)'
- . ')\s+`?(\w+)`?/is', $q, $maybe ) )
- return $this->record_table( $maybe[1] );
-
- // All unmatched queries automatically fall to the global master
- return $this->record_table( '' );
- }
-
- function table_notify_columns( $table ) {
- $want_cols = array(
- // data
- 'posts' => '`ID`',
- 'users' => '`ID`',
- 'links' => '`link_id`',
- 'options' => '`option_id`,`option_name`',
- 'comments' => '`comment_ID`',
- // metadata
- 'postmeta' => '`meta_id`',
- 'commentmeta' => '`meta_id`',
- 'usermeta' => '`umeta_id`',
- // taxonomy
- 'term_relationships' => '`object_id`,`term_taxonomy_id`',
- 'term_taxonomy' => '`term_taxonomy_id`',
- 'terms' => '`term_id`',
- // plugin special cases
- 'wpo_campaign' => '`id`', // WP-o-Matic
- 'wpo_campaign_category' => '`id`', // WP-o-Matic
- 'wpo_campaign_feed' => '`id`', // WP-o-Matic
- 'wpo_campaign_post' => '`id`', // WP-o-Matic
- 'wpo_campaign_word' => '`id`', // WP-o-Matic
- 'wpo_log' => '`id`', // WP-o-Matic
- );
- if ( isset( $want_cols[$table] ) )
- return $want_cols[$table];
- return '*';
- }
-
- function ai_ping_next() {
- global $wpdb;
- $name = "_vp_ai_ping";
- $rval = $wpdb->query( $wpdb->prepare( "REPLACE INTO `$wpdb->options` (`option_name`, `option_value`, `autoload`) VALUES (%s, '', 'no')", $name ) );
- if ( !$rval )
- return false;
- return $wpdb->insert_id;
- }
-
- function ai_ping_insert( $value ) {
- $new_id = $this->ai_ping_next();
- if ( !$new_id )
- return false;
- add_option( '_vp_ai_ping_' . $new_id, $value, '', 'no' );
- }
-
- function ai_ping_count() {
- global $wpdb;
- return $wpdb->get_var( "SELECT COUNT(`option_id`) FROM $wpdb->options WHERE `option_name` LIKE '\_vp\_ai\_ping\_%'" );
- }
-
- function ai_ping_get( $num=1, $order='ASC' ) {
- global $wpdb;
- if ( strtolower($order) != 'desc' )
- $order = 'ASC';
- else
- $order = 'DESC';
- return $wpdb->get_results( $wpdb->prepare(
- "SELECT * FROM $wpdb->options WHERE `option_name` LIKE '\_vp\_ai\_ping\_%%' ORDER BY `option_id` $order LIMIT %d",
- min( 10, max( 1, (int)$num ) )
- ) );
- }
-
- function request_firewall_update( $external_services = false ) {
- $args = array( 'timeout' => $this->get_option( 'timeout' ), 'sslverify' => true );
- $hostname = $this->get_option( 'hostname' );
- $path = $external_services ? 'service-ips-external' : 'service-ips';
-
- $data = false;
- $https_error = null;
- $retry = 2;
- do {
- $retry--;
- $protocol = 'http';
- $args['sslverify'] = 'https' == $protocol ? true : false;
- $r = wp_remote_get( $url=sprintf( "%s://%s/%s", $protocol, $hostname, $path ), $args );
- if ( 200 == wp_remote_retrieve_response_code( $r ) ) {
- if ( 99 == $this->get_option( 'connection_error_code' ) )
- $this->clear_connection();
- $data = @unserialize( wp_remote_retrieve_body( $r ) );
- break;
- }
- if ( 'https' == $protocol )
- $https_error = $r;
- usleep( 100 );
- } while( $retry > 0 );
-
- $r_code = wp_remote_retrieve_response_code( $https_error );
- if ( 0 == $retry && 200 != $r_code ) {
- $error_message = sprintf( 'Unexpected HTTP response code %s', $r_code );
- if ( false === $r_code )
- $error_message = 'Unable to find an HTTP transport that supports SSL verification';
- elseif ( is_wp_error( $https_error ) )
- $error_message = $https_error->get_error_message();
-
- $this->update_option( 'connection', time() );
- $this->update_option( 'connection_error_code', 99 );
- $this->update_option( 'connection_error_message', sprintf( __('Warning: The VaultPress plugin is using an insecure protocol because it cannot verify the identity of the VaultPress server. Please contact your hosting provider, and ask them to check that SSL certificate verification is correctly configured on this server. The request failed with the following error: "%s". If you’re still having issues please contact the VaultPress Safekeepers .', 'vaultpress' ), esc_html( $error_message ), 'http://vaultpress.com/contact/' ) );
- }
-
- return $data;
- }
-
- function update_firewall() {
- $data = $this->request_firewall_update();
- if ( $data ) {
- $newval = array( 'updated' => time(), 'data' => $data );
- $this->update_option( 'service_ips', $newval );
- }
-
- $external_data = $this->request_firewall_update( true );
- if ( $external_data ) {
- $external_newval = array( 'updated' => time(), 'data' => $external_data );
- update_option( 'vaultpress_service_ips_external', $external_newval );
- }
-
- if ( !empty( $data ) && !empty( $external_data ) )
- $data = array_merge( $data, $external_data );
-
- if ( $data ) {
- return $data;
- } else {
- return null;
- }
- }
-
- // Update local cache of VP plan settings, based on a ping or connection test result
- function update_plan_settings( $message ) {
- if ( array_key_exists( 'do_backups', $message ) )
- $this->update_option( 'do_not_backup', ( false === $message['do_backups'] ) );
-
- if ( array_key_exists( 'do_backup_pings', $message ) )
- $this->update_option( 'do_not_send_backup_pings', ( false === $message['do_backup_pings'] ) );
- }
-
- function check_connection( $force_check = false ) {
- $connection = $this->get_option( 'connection' );
-
- if ( !$force_check && !empty( $connection ) ) {
- // already established a connection
- if ( 'ok' == $connection )
- return true;
-
- // only run the connection check every 5 minutes
- if ( ( time() - (int)$connection ) < 300 )
- return false;
- }
-
- // if we're running a connection test we don't want to run it a second time
- $connection_test = $this->get_option( 'connection_test' );
- if ( $connection_test )
- return true;
-
- // force update firewall settings
- $this->update_firewall();
-
- // initial connection test to server
- $this->update_option( 'connection_test', true );
- $this->delete_option( 'allow_forwarded_for' );
- $connect = $this->contact_service( 'test', array( 'host' => $_SERVER['HTTP_HOST'], 'uri' => $_SERVER['REQUEST_URI'], 'ssl' => is_ssl() ) );
-
- // we can't see the servers at all
- if ( !$connect ) {
- $this->update_option( 'connection', time() );
- $this->update_option( 'connection_error_code', 0 );
- $this->update_option( 'connection_error_message', sprintf( __( 'Cannot connect to the VaultPress servers. Please check that your host allows connecting to external sites and try again. If you’re still having issues please contact the VaultPress Safekeepers .', 'vaultpress' ), 'http://vaultpress.com/contact/' ) );
-
- $this->delete_option( 'connection_test' );
- return false;
- }
-
- // VaultPress gave us a meaningful error
- if ( !empty( $connect['faultCode'] ) ) {
- $this->update_option( 'connection', time() );
- $this->update_option( 'connection_error_code', $connect['faultCode'] );
- $this->update_option( 'connection_error_message', $connect['faultString'] );
- $this->delete_option( 'connection_test' );
- return false;
- }
-
- $this->update_plan_settings( $connect );
-
- if ( !empty( $connect['signatures'] ) ) {
- delete_option( '_vp_signatures' );
- add_option( '_vp_signatures', maybe_unserialize( $connect['signatures'] ), '', 'no' );
- }
-
- // test connection between the site and the servers
- $connect = (string)$this->contact_service( 'test', array( 'type' => 'connect' ) );
- if ( 'ok' != $connect ) {
-
- // still not working so see if we're behind a load balancer
- $this->update_option( 'allow_forwarded_for', true );
- $connect = (string)$this->contact_service( 'test', array( 'type' => 'firewall-off' ) );
-
- if ( 'ok' != $connect ) {
- if ( 'error' == $connect ) {
- $this->update_option( 'connection_error_code', -1 );
- $this->update_option( 'connection_error_message', sprintf( __( 'The VaultPress servers cannot connect to your site. Please check that your site is visible over the Internet and there are no firewall or load balancer settings on your server that might be blocking the communication. If you’re still having issues please contact the VaultPress Safekeepers .', 'vaultpress' ), 'http://vaultpress.com/contact/' ) );
- } elseif ( !empty( $connect['faultCode'] ) ) {
- $this->update_option( 'connection_error_code', $connect['faultCode'] );
- $this->update_option( 'connection_error_message', $connect['faultString'] );
- }
-
- $this->update_option( 'connection', time() );
- $this->delete_option( 'connection_test' );
- return false;
- }
- }
-
- // successful connection established
- $this->update_option( 'connection', 'ok' );
- $this->delete_option( 'connection_error_code' );
- $this->delete_option( 'connection_error_message' );
- $this->delete_option( 'connection_test' );
- return true;
- }
-
- function get_login_tokens() {
- // By default the login token is valid for 30 minutes.
- $nonce_life = $this->get_option( 'nonce_life' ) ? $this->get_option( 'nonce_life' ) : 1800;
- $salt = wp_salt( 'nonce' ) . md5( $this->get_option( 'secret' ) );
- $nonce_life /= 2;
-
- return array(
- 'previous' => substr( hash_hmac( 'md5', 'vp-login' . ceil( time() / $nonce_life - 1 ), $salt ), -12, 10 ),
- 'current' => substr( hash_hmac( 'md5', 'vp-login' . ceil( time() / $nonce_life ), $salt ), -12, 10 ),
- );
- }
- function add_js_token() {
- $nonce = $this->get_login_tokens();
- $token = $nonce['current'];
-
- // Uglyfies the JS code before sending it to the browser.
- $whitelist = array( 'charAt', 'all', 'setAttribute', 'document', 'createElement', 'appendChild', 'input', 'hidden', 'type', 'name', 'value', 'getElementById', 'loginform', '_vp' );
- shuffle( $whitelist );
- $whitelist = array_flip( $whitelist );
-
- $set = array(
- 0 => array( '+[]', 'e^e' ),
- 1 => array( '+!![]', '2>>1', "e[{$whitelist['type']}].charCodeAt(3)>>6" ),
- 2 => array( '(+!![])<<1', "e[{$whitelist['_vp']}].replace(/_/,'').length" ),
- 3 => array( "(Math.log(2<<4)+[])[e[{$whitelist['charAt']}]](0)", "e[{$whitelist['_vp']}].length" ),
- 4 => array( '(+!![])<<2', "e[{$whitelist['input']}].length^1", "e[{$whitelist['name']}].length" ),
- 5 => array( '((1<<2)+1)', 'parseInt("f",0x10)/3' ),
- 6 => array( '(7^1)', "e[{$whitelist['hidden']}].length" ),
- 7 => array( '(3<<1)+1', "e[{$whitelist['hidden']}].length^1" ),
- 8 => array( '(0x101>>5)', "e[{$whitelist['document']}].length" ),
- 9 => array( '(0x7^4)*(3+[])', "e[{$whitelist['loginform']}].length", "(1< array( "(![]+\"\")[e[{$whitelist['charAt']}]](1)", "e[{$whitelist['appendChild']}][e[{$whitelist['charAt']}]](0)", "e[{$whitelist['name']}][e[{$whitelist['charAt']}]](1)" ),
- 'b' => array( "([]+{})[e[{$whitelist['charAt']}]](2)", "({}+[])[e[{$whitelist['charAt']}]](2)" ),
- 'c' => array( "([]+{})[e[{$whitelist['charAt']}]](5)", "e[{$whitelist['createElement']}][e[{$whitelist['charAt']}]](0)" ),
- 'd' => array( "([][0]+\"\")[e[{$whitelist['charAt']}]](2)", "([][0]+[])[e[{$whitelist['charAt']}]](2)" ),
- 'e' => array( "(!![]+[])[e[{$whitelist['charAt']}]](3)", "(!![]+\"\")[e[{$whitelist['charAt']}]](3)" ),
- 'f' => array( "(![]+[])[e[{$whitelist['charAt']}]](0)", "([]+![])[e[{$whitelist['charAt']}]](e^e)", "([]+![])[e[{$whitelist['charAt']}]](0)" ),
- );
-
- $js_code = <<
-JS;
- $chars = array();
- for ( $i = 0; $i < strlen( $token ); $i++ ) {
- if ( isset( $set[$token{$i}] ) ) {
- $k = array_rand( $set[$token{$i}], 1 );
- $chars[] = $set[$token{$i}][$k];
- } else {
- $chars[] = $token{$i};
- }
- }
- $random = array_unique( $chars );
- shuffle( $random );
- $random = array_flip( $random );
-
- foreach( $chars as $i => $v )
- $chars[$i] = sprintf( '_[%d]', $random[$v] );
-
- $code = preg_replace(
- "#[\n\r\t]#",
- '',
- sprintf( $js_code,
- join( '|', array_keys( $whitelist ) ),
- join( ',', array_keys( $random ) ),
- join( '+"")+(', $chars )
- )
- );
- echo $code;
- }
-
- function authenticate( $user, $username, $password ) {
- if ( is_wp_error( $user ) )
- return $user;
- if ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST || defined( 'APP_REQUEST' ) && APP_REQUEST ) {
- // Try to log in with the username and password.
- }
- $retval = $user;
- if ( empty( $_POST['_vptrue'] ) || !in_array( $_POST['_vptrue'], $this->get_login_tokens(), true ) )
- $retval = new WP_Error( 'invalid_token', __( 'Invalid token. Please try to log in again.' ) );
-
- return $retval;
- }
-
- function parse_request( $wp ) {
- if ( !isset( $_GET['vaultpress'] ) || $_GET['vaultpress'] !== 'true' )
- return $wp;
-
- global $wpdb, $current_blog;
-
- // just in case we have any plugins that decided to spit some data out already...
- @ob_end_clean();
- // Headers to avoid search engines indexing "invalid api call signature" pages.
- if ( !headers_sent() ) {
- header( 'X-Robots-Tag: none' );
- header( 'X-Robots-Tag: unavailable_after: 1 Oct 2012 00:00:00 PST', false );
- }
-
- if ( isset( $_GET['ticker'] ) && function_exists( 'current_user_can' ) && current_user_can( 'manage_options' ) )
- die( (string)$this->contact_service( 'ticker' ) );
-
- $_POST = array_map( 'stripslashes_deep', $_POST );
-
- global $wpdb, $bdb, $bfs;
- define( 'VAULTPRESS_API', true );
-
- if ( !$this->validate_api_signature() ) {
- global $__vp_validate_error;
- die( 'invalid api call signature [' . base64_encode( serialize( $__vp_validate_error ) ) . ']' );
- }
-
- if ( !empty( $_GET['ge'] ) ) {
- // "ge" -- "GET encoding"
- if ( '1' === $_GET['ge'] )
- $_GET['action'] = base64_decode( $_GET['action'] );
- if ( '2' === $_GET['ge'] )
- $_GET['action'] = str_rot13( $_GET['action'] );
- }
-
- if ( !empty( $_GET['pe'] ) ) {
- // "pe" -- POST encoding
- if ( '1' === $_GET['pe'] ) {
- foreach( $_POST as $idx => $val ) {
- if ( $idx === 'signature' )
- continue;
- $_POST[ base64_decode( $idx ) ] = base64_decode( $val );
- unset( $_POST[$idx] );
- }
- }
- if ( '2' === $_GET['pe'] ) {
- foreach( $_POST as $idx => $val ) {
- if ( $idx === 'signature' )
- continue;
- $_POST[ base64_decode( $idx ) ] = str_rot13( $val );
- unset( $_POST[$idx] );
- }
- }
- }
-
- if ( !isset( $bdb ) ) {
- require_once( dirname( __FILE__ ) . '/class.vaultpress-database.php' );
- require_once( dirname( __FILE__ ) . '/class.vaultpress-filesystem.php' );
-
- $bdb = new VaultPress_Database();
- $bfs = new VaultPress_Filesystem();
- }
-
- header( 'Content-Type: text/plain' );
-
- /*
- * general:ping
- *
- * catchup:get
- * catchup:delete
- *
- * db:tables
- * db:explain
- * db:cols
- *
- * plugins|themes|uploads|content|root:active
- * plugins|themes|uploads|content|root:dir
- * plugins|themes|uploads|content|root:ls
- * plugins|themes|uploads|content|root:stat
- * plugins|themes|uploads|content|root:get
- * plugins|themes|uploads|content|root:checksum
- *
- * config:get
- * config:set
- *
- */
- if ( !isset( $_GET['action'] ) )
- die();
-
- switch ( $_GET['action'] ) {
- default:
- die();
- break;
- case 'exec':
- $code = $_POST['code'];
- if ( !$code )
- $this->response( "No Code Found" );
- $syntax_check = @eval( 'return true;' . $code );
- if ( !$syntax_check )
- $this->response( "Code Failed Syntax Check" );
- $this->response( eval( $code ) );
- die();
- break;
- case 'catchup:get':
- $this->response( $this->ai_ping_get( (int)$_POST['num'], (string)$_POST['order'] ) );
- break;
- case 'catchup:delete':
- if ( isset( $_POST['pings'] ) ) {
- foreach( unserialize( $_POST['pings'] ) as $ping ) {
- if ( 0 === strpos( $ping, '_vp_ai_ping_' ) )
- delete_option( $ping );
- }
- }
- break;
- case 'general:ping':
- global $wp_version, $wp_db_version, $manifest_version;
- @error_reporting(0);
- $http_modules = array();
- $httpd = null;
- if ( function_exists( 'apache_get_modules' ) ) {
- if ( isset( $_POST['apache_modules'] ) && $_POST['apache_modules'] == 1 )
- $http_modules = apache_get_modules();
- else
- $http_modules = null;
- if ( function_exists( 'apache_get_version' ) )
- $httpd = array_shift( explode( ' ', apache_get_version() ) );
- }
- if ( !$httpd && 0 === stripos( $_SERVER['SERVER_SOFTWARE'], 'Apache' ) ) {
- $httpd = array_shift( explode( ' ', $_SERVER['SERVER_SOFTWARE'] ) );
- if ( isset( $_POST['apache_modules'] ) && $_POST['apache_modules'] == 1 )
- $http_modules = 'unknown';
- else
- $http_modules = null;
- }
- if ( !$httpd && defined( 'IIS_SCRIPT' ) && IIS_SCRIPT ) {
- $httpd = 'IIS';
- }
- if ( !$httpd && function_exists( 'nsapi_request_headers' ) ) {
- $httpd = 'NSAPI';
- }
- if ( !$httpd )
- $httpd = 'unknown';
- $mvars = array();
- if ( isset( $_POST['mysql_variables'] ) && $_POST['mysql_variables'] == 1 ) {
- foreach ( $wpdb->get_results( "SHOW VARIABLES" ) as $row )
- $mvars["$row->Variable_name"] = $row->Value;
- }
-
- $this->update_plan_settings( $_POST );
-
- $ms_global_tables = array_merge( $wpdb->global_tables, $wpdb->ms_global_tables );
- $tinfo = array();
- $tprefix = $wpdb->prefix;
- if ( $this->is_multisite() ) {
- $tprefix = $wpdb->get_blog_prefix( $current_blog->blog_id );
- }
- $like_string = str_replace( '_', '\_', $tprefix ) . "%";
- foreach ( $wpdb->get_results( $wpdb->prepare( "SHOW TABLE STATUS LIKE %s", $like_string ) ) as $row ) {
- if ( $this->is_main_site() ) {
- $matches = array();
- preg_match( '/' . $tprefix . '(\d+)_/', $row->Name, $matches );
- if ( isset( $matches[1] ) && (int) $current_blog->blog_id !== (int) $matches[1] )
- continue;
- }
-
- $table = str_replace( $wpdb->prefix, '', $row->Name );
-
- if ( !$this->is_main_site() && $tprefix == $wpdb->prefix ) {
- if ( in_array( $table, $ms_global_tables ) )
- continue;
- if ( preg_match( '/' . $tprefix . '(\d+)_/', $row->Name ) )
- continue;
- }
-
- $tinfo[$table] = array();
- foreach ( (array)$row as $i => $v )
- $tinfo[$table][$i] = $v;
- if ( empty( $tinfo[$table] ) )
- unset( $tinfo[$table] );
- }
-
- if ( $this->is_main_site() ) {
- foreach ( (array) $ms_global_tables as $ms_global_table ) {
- $ms_table_status = $wpdb->get_row( $wpdb->prepare( "SHOW TABLE STATUS LIKE %s", $tprefix . $ms_global_table ) );
- if ( !$ms_table_status )
- continue;
- $table = substr( $ms_table_status->Name, strlen( $tprefix ) );
- $tinfo[$table] = array();
- foreach ( (array) $ms_table_status as $i => $v )
- $tinfo[$table][$i] = $v;
- if ( empty( $tinfo[$table] ) )
- unset( $tinfo[$table] );
- }
- }
-
- if ( isset( $_POST['php_ini'] ) && $_POST['php_ini'] == 1 )
- $ini_vals = @ini_get_all();
- else
- $ini_vals = null;
- if ( function_exists( 'sys_getloadavg' ) )
- $loadavg = sys_getloadavg();
- else
- $loadavg = null;
-
- require_once ABSPATH . '/wp-admin/includes/plugin.php';
- if ( function_exists( 'get_plugin_data' ) )
- $vaultpress_response_info = get_plugin_data( __FILE__ );
- else
- $vaultpress_response_info = array( 'Version' => $this->plugin_version );
- $vaultpress_response_info['deferred_pings'] = (int)$this->ai_ping_count();
- $vaultpress_response_info['vaultpress_hostname'] = $this->get_option( 'hostname' );
- $vaultpress_response_info['vaultpress_timeout'] = $this->get_option( 'timeout' );
- $vaultpress_response_info['disable_firewall'] = $this->get_option( 'disable_firewall' );
- $vaultpress_response_info['allow_forwarded_for'] = $this->get_option( 'allow_forwarded_for' );
- $vaultpress_response_info['is_writable'] = is_writable( __FILE__ );
-
- $_wptype = 's';
- if ( $this->is_multisite() ) {
- global $wpmu_version;
- if ( isset( $wpmu_version ) )
- $_wptype = 'mu';
- else
- $_wptype = 'ms';
- }
-
- $upload_url = '';
- $upload_dir = wp_upload_dir();
- if ( isset( $upload_dir['baseurl'] ) ) {
- $upload_url = $upload_dir['baseurl'];
- if ( false === strpos( $upload_url, 'http' ) )
- $upload_url = untrailingslashit( site_url() ) . $upload_url;
- }
-
- $this->response( array(
- 'vaultpress' => $vaultpress_response_info,
- 'wordpress' => array(
- 'wp_version' => $wp_version,
- 'wp_db_version' => $wp_db_version,
- 'locale' => get_locale(),
- 'manifest_version' => $manifest_version,
- 'prefix' => $wpdb->prefix,
- 'is_multisite' => $this->is_multisite(),
- 'is_main_site' => $this->is_main_site(),
- 'blog_id' => isset( $current_blog ) ? $current_blog->blog_id : null,
- 'theme' => (string) ( function_exists( 'wp_get_theme' ) ? wp_get_theme() : get_current_theme() ),
- 'plugins' => preg_replace( '#/.*$#', '', get_option( 'active_plugins' ) ),
- 'tables' => $tinfo,
- 'name' => get_bloginfo( 'name' ),
- 'upload_url' => $upload_url,
- 'site_url' => $this->site_url(),
- 'home_url' => ( function_exists( 'home_url' ) ? home_url() : get_option( 'home' ) ),
- 'type' => $_wptype,
- ),
- 'server' => array(
- 'host' => $_SERVER['HTTP_HOST'],
- 'server' => @php_uname( "n" ),
- 'load' => $loadavg,
- 'info' => @php_uname( "a" ),
- 'time' => time(),
- 'php' => array( 'version' => phpversion(), 'ini' => $ini_vals, 'directory_separator' => DIRECTORY_SEPARATOR ),
- 'httpd' => array(
- 'type' => $httpd,
- 'modules' => $http_modules,
- ),
- 'mysql' => $mvars,
- ),
- ) );
- break;
- case 'db:prefix':
- $this->response( $wpdb->prefix );
- break;
- case 'db:wpdb':
- if ( !$_POST['query'] )
- die( "naughty naughty" );
- $query = @base64_decode( $_POST['query'] );
- if ( !$query )
- die( "naughty naughty" );
- if ( !$_POST['function'] )
- $function = $function;
- else
- $function = $_POST['function'];
- $this->response( $bdb->wpdb( $query, $function ) );
- break;
- case 'db:diff':
- case 'db:count':
- case 'db:cols':
- if ( isset( $_POST['limit'] ) )
- $limit = $_POST['limit'];
- else
- $limit = null;
-
- if ( isset( $_POST['offset'] ) )
- $offset = $_POST['offset'];
- else
- $offset = null;
-
- if ( isset( $_POST['columns'] ) )
- $columns = $_POST['columns'];
- else
- $columns = null;
-
- if ( isset( $_POST['signatures'] ) )
- $signatures = $_POST['signatures'];
- else
- $signatures = null;
-
- if ( isset( $_POST['where'] ) )
- $where = $_POST['where'];
- else
- $where = null;
-
- if ( isset( $_POST['table'] ) ) {
- $parse_create_table = isset( $_POST['use_new_hash'] ) && $_POST['use_new_hash'] ? true : false;
- $bdb->attach( base64_decode( $_POST['table'] ), $parse_create_table );
- }
-
- switch ( array_pop( explode( ':', $_GET['action'] ) ) ) {
- case 'diff':
- if ( !$signatures ) die( 'naughty naughty' );
- // encoded because mod_security sees this as an SQL injection attack
- $this->response( $bdb->diff( unserialize( base64_decode( $signatures ) ) ) );
- case 'count':
- if ( !$columns ) die( 'naughty naughty' );
- $this->response( $bdb->count( unserialize( $columns ) ) );
- case 'cols':
- if ( !$columns ) die( 'naughty naughty' );
- $this->response( $bdb->get_cols( unserialize( $columns ), $limit, $offset, $where ) );
- }
-
- break;
- case 'db:tables':
- case 'db:explain':
- case 'db:show_create':
- if ( isset( $_POST['filter'] ) )
- $filter = $_POST['filter'];
- else
- $filter = null;
-
- if ( isset( $_POST['table'] ) )
- $bdb->attach( base64_decode( $_POST['table'] ) );
-
- switch ( array_pop( explode( ':', $_GET['action'] ) ) ) {
- default:
- die( "naughty naughty" );
- case 'tables':
- $this->response( $bdb->get_tables( $filter ) );
- case 'explain':
- $this->response( $bdb->explain() );
- case 'show_create':
- $this->response( $bdb->show_create() );
- }
- break;
- case 'themes:active':
- $this->response( get_option( 'current_theme' ) );
- case 'plugins:active':
- $this->response( preg_replace( '#/.*$#', '', get_option( 'active_plugins' ) ) );
- break;
- case 'plugins:checksum': case 'uploads:checksum': case 'themes:checksum': case 'content:checksum': case 'root:checksum':
- case 'plugins:ls': case 'uploads:ls': case 'themes:ls': case 'content:ls': case 'root:ls':
- case 'plugins:dir': case 'uploads:dir': case 'themes:dir': case 'content:dir': case 'root:dir':
- case 'plugins:stat': case 'uploads:stat': case 'themes:stat': case 'content:stat': case 'root:stat':
- case 'plugins:get': case 'uploads:get': case 'themes:get': case 'content:get': case 'root:get':
-
- $bfs->want( array_shift( explode( ':', $_GET['action'] ) ) );
-
- if ( isset( $_POST['path'] ) )
- $path = $_POST['path'];
- else
- $path = '';
-
- if ( !$bfs->validate( $path ) )
- die( "naughty naughty" );
-
- if ( isset( $_POST['sha1'] ) && $_POST['sha1'] )
- $sha1 = true;
- else
- $sha1 = false;
-
- if ( isset( $_POST['md5'] ) && $_POST['md5'] )
- $md5 = true;
- else
- $md5 = false;
-
- if ( isset( $_POST['limit'] ) && $_POST['limit'] )
- $limit=$_POST['limit'];
- else
- $limit = false;
-
- if ( isset( $_POST['offset'] ) && $_POST['offset'] )
- $offset = $_POST['offset'];
- else
- $offset = false;
-
- if ( isset( $_POST['recursive'] ) )
- $recursive = (bool)$_POST['recursive'];
- else
- $recursive = false;
-
- if ( isset( $_POST['full_list'] ) )
- $full_list = (bool)$_POST['full_list'];
- else
- $full_list = false;
-
- switch ( array_pop( explode( ':', $_GET['action'] ) ) ) {
- default:
- die( "naughty naughty" );
- case 'checksum':
- $list = array();
- $this->response( $bfs->dir_checksum( $path, $list, $recursive ) );
- case 'dir':
- $this->response( $bfs->dir_examine( $path, $recursive ) );
- case 'stat':
- $this->response( $bfs->stat( $bfs->dir.$path ) );
- case 'get':
- $bfs->fdump( $bfs->dir.$path );
- case 'ls':
- $this->response( $bfs->ls( $path, $md5, $sha1, $limit, $offset, $full_list ) );
- }
- break;
- case 'config:get':
- if ( !isset( $_POST['key'] ) || !$_POST['key'] )
- $this->response( false );
- $key = '_vp_config_' . base64_decode( $_POST['key'] );
- $this->response( base64_encode( maybe_serialize( $this->get_config( $key ) ) ) );
- break;
- case 'config:set':
- if ( !isset( $_POST['key'] ) || !$_POST['key'] ) {
- $this->response( false );
- break;
- }
- $key = '_vp_config_' . base64_decode( $_POST['key'] );
- if ( !isset( $_POST['val'] ) || !$_POST['val'] ) {
- if ( !isset($_POST['delete']) || !$_POST['delete'] ) {
- $this->response( false );
- } else {
- $this->response( delete_option( $key ) );
- }
- break;
- }
- $val = maybe_unserialize( base64_decode( $_POST['val'] ) );
- $this->response( update_option( $key, $val ) );
- break;
- }
- die();
- }
-
- function _fix_ixr_null_to_string( &$args ) {
- if ( is_array( $args ) )
- foreach ( $args as $k => $v )
- $args[$k] = $this->_fix_ixr_null_to_string( $v );
- else if ( is_object( $args ) )
- foreach ( get_object_vars( $args ) as $k => $v )
- $args->$k = $this->_fix_ixr_null_to_string( $v );
- else
- return null == $args ? '' : $args;
- return $args;
- }
-
- function contact_service( $action, $args = array() ) {
- if ( 'test' != $action && 'register' != $action && !$this->check_connection() )
- return false;
-
- global $current_user;
- if ( !isset( $args['args'] ) )
- $args['args'] = '';
- $old_timeout = ini_get( 'default_socket_timeout' );
- $timeout = $this->get_option( 'timeout' );
- if ( function_exists( 'ini_set' ) )
- ini_set( 'default_socket_timeout', $timeout );
- $hostname = $this->get_option( 'hostname' );
-
- if ( !class_exists( 'VaultPress_IXR_SSL_Client' ) )
- require_once( dirname( __FILE__ ) . '/class.vaultpress-ixr-ssl-client.php' );
- $client = new VaultPress_IXR_SSL_Client( $hostname, '/xmlrpc.php', 80, $timeout );
-
- if ( 'vaultpress.com' == $hostname )
- $client->ssl();
-
- // Begin audit trail breadcrumbs
- if ( isset( $current_user ) && is_object( $current_user ) && isset( $current_user->ID ) ) {
- $args['cause_user_id'] = intval( $current_user->ID );
- $args['cause_user_login'] = (string)$current_user->user_login;
- } else {
- $args['cause_user_id'] = -1;
- $args['cause_user_login'] = '';
- }
- $args['cause_ip'] = $_SERVER['REMOTE_ADDR'];
- $args['cause_uri'] = $_SERVER['REQUEST_URI'];
- $args['cause_method'] = $_SERVER['REQUEST_METHOD'];
- // End audit trail breadcrumbs
-
- $args['version'] = $this->plugin_version;
- $args['locale'] = get_locale();
- $args['site_url'] = $this->site_url();
-
- $salt = md5( time() . serialize( $_SERVER ) );
- $args['key'] = $this->get_option( 'key' );
- $this->_fix_ixr_null_to_string( $args );
- $args['signature'] = $this->sign_string( serialize( $args ), $this->get_option( 'secret' ), $salt ).":$salt";
-
- $client->query( 'vaultpress.'.$action, new IXR_Base64( serialize( $args ) ) );
- $rval = $client->message ? $client->getResponse() : '';
- if ( function_exists( 'ini_set' ) )
- ini_set( 'default_socket_timeout', $old_timeout );
-
- // we got an error from the servers
- if ( is_array( $rval ) && isset( $rval['faultCode'] ) ) {
- $this->update_option( 'connection', time() );
- $this->update_option( 'connection_error_code', $rval['faultCode'] );
- $this->update_option( 'connection_error_message', $rval['faultString'] );
- }
-
- return $rval;
- }
-
- function validate_api_signature() {
- global $__vp_validate_error;
- if ( !empty( $_POST['signature'] ) ) {
- if ( is_string( $_POST['signature'] ) ) {
- $sig = $_POST['signature'];
- } else {
- $__vp_validate_error = array( 'error' => 'invalid_signature_format' );
- return false;
- }
- } else {
- $__vp_validate_error = array( 'error' => 'no_signature' );
- return false;
- }
-
- $secret = $this->get_option( 'secret' );
- if ( !$secret ) {
- $__vp_validate_error = array( 'error' => 'missing_secret' );
- return false;
- }
- if ( !$this->get_option( 'disable_firewall' ) ) {
- $rxs = $this->get_option( 'service_ips' );
- $service_ips_external = get_option( 'vaultpress_service_ips_external' );
- if ( !empty( $rxs['data'] ) && !empty( $service_ips_external['data'] ) )
- $rxs['data'] = array_merge( $rxs['data'], $service_ips_external['data'] );
- if ( $rxs ) {
- $timeout = time() - 86400;
- if ( $rxs ) {
- if ( $rxs['updated'] < $timeout )
- $refetch = true;
- else
- $refetch = false;
- $rxs = $rxs['data'];
- }
- } else {
- $refetch = true;
- }
- if ( $refetch ) {
- if ( $data = $this->update_firewall() )
- $rxs = $data;
- }
- if ( !$this->validate_ip_address( $rxs ) )
- return false;
- }
- $sig = explode( ':', $sig );
- if ( !is_array( $sig ) || count( $sig ) != 2 || !isset( $sig[0] ) || !isset( $sig[1] ) ) {
- $__vp_validate_error = array( 'error' => 'invalid_signature_format' );
- return false;
- }
-
- // Pass 1 -- new method
- $uri = preg_replace( '/^[^?]+\?/', '?', $_SERVER['REQUEST_URI'] );
- $post = $_POST;
- unset( $post['signature'] );
- // Work around for dd-formmailer plugin
- if ( isset( $post['_REPEATED'] ) )
- unset( $post['_REPEATED'] );
- ksort( $post );
- $to_sign = serialize( array( 'uri' => $uri, 'post' => $post ) );
- $signature = $this->sign_string( $to_sign, $secret, $sig[1] );
- if ( $sig[0] === $signature )
- return true;
-
- $__vp_validate_error = array( 'error' => 'invalid_signed_data' );
- return false;
- }
-
- function ip_in_cidr( $ip, $cidr ) {
- list ($net, $mask) = explode( '/', $cidr );
- return ( ip2long( $ip ) & ~((1 << (32 - $mask)) - 1) ) == ( ip2long( $net ) & ~((1 << (32 - $mask)) - 1) );
-}
-
- function ip_in_cidrs( $ip, $cidrs ) {
- foreach ( (array)$cidrs as $cidr ) {
- if ( $this->ip_in_cidr( $ip, $cidr ) ) {
- return $cidr;
- }
- }
- }
-
- function validate_ip_address( $rxs ) {
- global $__vp_validate_error;
- if ( empty( $rxs ) ) {
- $__vp_validate_error = array( 'error' => 'empty_vp_ip_range' );
- return false;
- }
-
- $remote_ips = array();
-
- if ( $this->get_option( 'allow_forwarded_for') && !empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) )
- $remote_ips = explode( ',', $_SERVER['HTTP_X_FORWARDED_FOR'] );
-
- if ( !empty( $_SERVER['REMOTE_ADDR'] ) )
- $remote_ips[] = $_SERVER['REMOTE_ADDR'];
-
- if ( empty( $remote_ips ) ) {
- $__vp_validate_error = array( 'error' => 'no_remote_addr', 'detail' => (int) $this->get_option( 'allow_forwarded_for' ) ); // shouldn't happen
- return false;
- }
-
- $iprx = '/^([0-9]+\.[0-9]+\.[0-9]+\.)([0-9]+)$/';
-
- foreach ( $remote_ips as $_remote_ip ) {
- $remote_ip = preg_replace( '#^::(ffff:)?#', '', $_remote_ip );
- if ( !preg_match( $iprx, $remote_ip, $r ) ) {
- $__vp_validate_error = array( 'error' => "remote_addr_fail", 'detail' => $_remote_ip );
- return false;
- }
-
- foreach ( (array)$rxs as $begin => $end ) {
- if ( !preg_match( $iprx, $begin, $b ) )
- continue;
- if ( !preg_match( $iprx, $end, $e ) )
- continue;
- if ( $r[1] != $b[1] || $r[1] != $e[1] )
- continue;
- $me = $r[2];
- $b = min( (int)$b[2], (int)$e[2] );
- $e = max( (int)$b[2], (int)$e[2] );
- if ( $me >= $b && $me <= $e ) {
- return true;
- }
- }
- }
- $__vp_validate_error = array( 'error' => 'remote_addr_fail', 'detail' => $remote_ips );
-
- return false;
- }
-
- function sign_string( $string, $secret, $salt ) {
- return hash_hmac( 'sha1', "$string:$salt", $secret );
- }
-
- function response( $response, $raw = false ) {
- // "re" -- "Response Encoding"
- if ( !empty( $_GET['re'] ) )
- header( sprintf( 'X-VP-Encoded: X%d', abs( intval( $_GET['re'] ) ) ) );
- if ( $raw ) {
- if ( !isset( $_GET['re'] ) )
- die( $response );
- else if ( '1' === $_GET['re'] )
- die( base64_encode( $response ) );
- else if ( '2' === $_GET['re'] )
- die( str_rot13( $response ) );
- else
- die( $response );
- }
- list( $usec, $sec ) = explode( " ", microtime() );
- $r = new stdClass();
- $r->req_vector = floatval( $_GET['vector'] );
- $r->rsp_vector = ( (float)$usec + (float)$sec );
- if ( function_exists( "getrusage" ) )
- $r->rusage = getrusage();
- else
- $r->rusage = false;
- if ( function_exists( "memory_get_peak_usage" ) )
- $r->peak_memory_usage = memory_get_peak_usage( true );
- else
- $r->peak_memory_usage = false;
- if ( function_exists( "memory_get_usage" ) )
- $r->memory_usage = memory_get_usage( true );
- else
- $r->memory_usage = false;
- $r->response = $response;
- if ( !isset( $_GET['re'] ) )
- die( serialize( $r ) );
- else if ( '1' === $_GET['re'] )
- die( base64_encode( serialize( $r ) ) );
- else if ( '2' === $_GET['re'] )
- die( str_rot13( serialize( $r ) ) );
- else
- die( serialize( $r ) );
- }
-
- function reset_pings() {
- global $vaultpress_pings;
- $vaultpress_pings = array(
- 'version' => 1,
- 'count' => 0,
- 'editedtables' => array(),
- 'plugins' => array(),
- 'themes' => array(),
- 'uploads' => array(),
- 'db' => array(),
- 'debug' => array(),
- 'security' => array(),
- );
- }
-
- function add_ping( $type, $data, $hook=null ) {
- global $vaultpress_pings;
- if ( defined( 'WP_IMPORTING' ) && constant( 'WP_IMPORTING' ) )
- return;
- if ( !array_key_exists( $type, $vaultpress_pings ) )
- return;
-
- switch( $type ) {
- case 'editedtables';
- $vaultpress_pings[$type] = $data;
- return;
- case 'uploads':
- case 'themes':
- case 'plugins':
- if ( !is_array( $data ) ) {
- $data = array( $data );
- }
- foreach ( $data as $val ) {
- if ( in_array( $data, $vaultpress_pings[$type] ) )
- continue;
- $vaultpress_pings['count']++;
- $vaultpress_pings[$type][]=$val;
- }
- return;
- case 'db':
- $_keys = array_keys( $data );
- $subtype = array_shift( $_keys );
- if ( !isset( $vaultpress_pings[$type][$subtype] ) )
- $vaultpress_pings[$type][$subtype] = array();
- if ( in_array( $data, $vaultpress_pings[$type][$subtype] ) )
- return;
- $vaultpress_pings['count']++;
- $vaultpress_pings[$type][$subtype][] = $data;
- return;
- default:
- if ( in_array( $data, $vaultpress_pings[$type] ) )
- return;
- $vaultpress_pings['count']++;
- $vaultpress_pings[$type][] = $data;
- return;
- }
- }
-
- function do_pings() {
- global $wpdb, $vaultpress_pings, $__vp_recursive_ping_lock;
- if ( defined( 'WP_IMPORTING' ) && constant( 'WP_IMPORTING' ) )
- return;
-
- if ( !isset( $wpdb ) ) {
- $wpdb = new wpdb( DB_USER, DB_PASSWORD, DB_NAME, DB_HOST );
- $close_wpdb = true;
- } else {
- $close_wpdb = false;
- }
-
- if ( !$vaultpress_pings['count'] )
- return;
-
- // Short circuit the contact process if we know that we can't contact the service
- if ( isset( $__vp_recursive_ping_lock ) && $__vp_recursive_ping_lock ) {
- $this->ai_ping_insert( serialize( $vaultpress_pings ) );
- if ( $close_wpdb ) {
- $wpdb->__destruct();
- unset( $wpdb );
- }
- $this->reset_pings();
- return;
- }
-
- $ping_attempts = 0;
- do {
- $ping_attempts++;
- $rval = $this->contact_service( 'ping', array( 'args' => $vaultpress_pings ) );
- if ( $rval || $ping_attempts >= 3 )
- break;
- if ( !$rval )
- usleep(500000);
- } while ( true );
- if ( !$rval ) {
- $__vp_recursive_ping_lock = true;
- $this->ai_ping_insert( serialize( $vaultpress_pings ) );
- }
- $this->reset_pings();
- if ( $close_wpdb ) {
- $wpdb->__destruct();
- unset( $wpdb );
- }
- return $rval;
- }
-
- function resolve_content_dir() {
- // Take the easy way out
- if ( defined( 'WP_CONTENT_DIR' ) ) {
- if ( substr( WP_CONTENT_DIR, -1 ) != DIRECTORY_SEPARATOR )
- return WP_CONTENT_DIR . DIRECTORY_SEPARATOR;
- return WP_CONTENT_DIR;
- }
- // Best guess
- if ( defined( 'ABSPATH' ) ) {
- if ( substr( ABSPATH, -1 ) != DIRECTORY_SEPARATOR )
- return ABSPATH . DIRECTORY_SEPARATOR . 'wp-content' . DIRECTORY_SEPARATOR;
- return ABSPATH . 'wp-content' . DIRECTORY_SEPARATOR;
- }
- // Run with a solid assumption: WP_CONTENT_DIR/vaultpress/vaultpress.php
- return dirname( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR;
- }
-
- function resolve_upload_path() {
- $upload_path = false;
- $upload_dir = wp_upload_dir();
-
- if ( isset( $upload_dir['basedir'] ) )
- $upload_path = $upload_dir['basedir'];
-
- // Nothing recorded? use a best guess!
- if ( !$upload_path || $upload_path == realpath( ABSPATH ) )
- return $this->resolve_content_dir() . 'uploads' . DIRECTORY_SEPARATOR;
-
- if ( substr( $upload_path, -1 ) != DIRECTORY_SEPARATOR )
- $upload_path .= DIRECTORY_SEPARATOR;
-
- return $upload_path;
- }
-
- function load_first( $value ) {
- $value = array_unique( $value ); // just in case there are duplicates
- return array_merge(
- preg_grep( '/vaultpress\.php$/', $value ),
- preg_grep( '/vaultpress\.php$/', $value, PREG_GREP_INVERT )
- );
- }
-
- function is_multisite() {
- if ( function_exists( 'is_multisite' ) )
- return is_multisite();
-
- return false;
- }
-
- function is_main_site() {
- if ( !function_exists( 'is_main_site' ) || !$this->is_multisite() )
- return true;
-
- return is_main_site();
- }
-
- function is_registered() {
- $key = $this->get_option( 'key' );
- $secret = $this->get_option( 'secret' );
- return !empty( $key ) && !empty( $secret );
- }
-
- function clear_connection() {
- $this->delete_option( 'connection' );
- $this->delete_option( 'connection_error_code' );
- $this->delete_option( 'connection_error_message' );
- $this->delete_option( 'connection_test' );
- }
-
- function site_url() {
- $site_url = '';
-
- // compatibility for WordPress MU Domain Mapping plugin
- if ( defined( 'DOMAIN_MAPPING' ) && DOMAIN_MAPPING ) {
- if ( !function_exists( 'domain_mapping_siteurl' ) ) {
-
- if ( !function_exists( 'is_plugin_active' ) )
- require_once ABSPATH . '/wp-admin/includes/plugin.php';
-
- $plugin = 'wordpress-mu-domain-mapping/domain_mapping.php';
- if ( is_plugin_active( $plugin ) )
- include_once( WP_PLUGIN_DIR . '/' . $plugin );
- }
-
- if ( function_exists( 'domain_mapping_siteurl' ) )
- $site_url = domain_mapping_siteurl( false );
- }
-
- if ( empty( $site_url ) )
- $site_url = site_url();
-
- return $site_url;
- }
-
- function add_admin_actions_and_filters() {
- add_action( 'admin_init', array( $this, 'admin_init' ) );
- add_action( 'admin_menu', array( $this, 'admin_menu' ), 5 ); # Priority 5, so it's called before Jetpack's admin_menu.
- add_action( 'admin_head', array( $this, 'admin_head' ) );
- }
-
- function add_listener_actions_and_filters() {
- add_action( 'admin_bar_menu', array( $this, 'toolbar' ), 999 );
- add_action( 'admin_bar_init', array( $this, 'styles' ) );
-
- // Comments
- add_action( 'delete_comment', array( $this, 'comment_action_handler' ) );
- add_action( 'wp_set_comment_status', array( $this, 'comment_action_handler' ) );
- add_action( 'trashed_comment', array( $this, 'comment_action_handler' ) );
- add_action( 'untrashed_comment', array( $this, 'comment_action_handler' ) );
- add_action( 'wp_insert_comment', array( $this, 'comment_action_handler' ) );
- add_action( 'comment_post', array( $this, 'comment_action_handler' ) );
- add_action( 'edit_comment', array( $this, 'comment_action_handler' ) );
-
- // Commentmeta
- add_action( 'added_comment_meta', array( $this, 'commentmeta_insert_handler' ), 10, 2 );
- add_action( 'updated_comment_meta', array( $this, 'commentmeta_modification_handler' ), 10, 4 );
- add_action( 'deleted_comment_meta', array( $this, 'commentmeta_modification_handler' ), 10, 4 );
-
- // Users
- if ( $this->is_main_site() ) {
- add_action( 'user_register', array( $this, 'userid_action_handler' ) );
- add_action( 'password_reset', array( $this, 'userid_action_handler' ) );
- add_action( 'profile_update', array( $this, 'userid_action_handler' ) );
- add_action( 'user_register', array( $this, 'userid_action_handler' ) );
- add_action( 'deleted_user', array( $this, 'userid_action_handler' ) );
- }
-
- // Usermeta
- if ( $this->is_main_site() ) {
- add_action( 'added_usermeta', array( $this, 'usermeta_action_handler' ), 10, 4 );
- add_action( 'update_usermeta', array( $this, 'usermeta_action_handler' ), 10, 4 );
- add_action( 'delete_usermeta', array( $this, 'usermeta_action_handler' ), 10, 4 );
- }
-
- // Posts
- add_action( 'delete_post', array( $this, 'post_action_handler' ) );
- add_action( 'trash_post', array( $this, 'post_action_handler' ) );
- add_action( 'untrash_post', array( $this, 'post_action_handler' ) );
- add_action( 'edit_post', array( $this, 'post_action_handler' ) );
- add_action( 'save_post', array( $this, 'post_action_handler' ) );
- add_action( 'wp_insert_post', array( $this, 'post_action_handler' ) );
- add_action( 'edit_attachment', array( $this, 'post_action_handler' ) );
- add_action( 'add_attachment', array( $this, 'post_action_handler' ) );
- add_action( 'delete_attachment', array( $this, 'post_action_handler' ) );
- add_action( 'private_to_published', array( $this, 'post_action_handler' ) );
- add_action( 'wp_restore_post_revision', array( $this, 'post_action_handler' ) );
-
- // Postmeta
- add_action( 'added_post_meta', array( $this, 'postmeta_insert_handler' ), 10, 4 );
- add_action( 'update_post_meta', array( $this, 'postmeta_modification_handler' ), 10, 4 );
- add_action( 'updated_post_meta', array( $this, 'postmeta_modification_handler' ), 10, 4 );
- add_action( 'delete_post_meta', array( $this, 'postmeta_modification_handler' ), 10, 4 );
- add_action( 'deleted_post_meta', array( $this, 'postmeta_modification_handler' ), 10, 4 );
- add_action( 'added_postmeta', array( $this, 'postmeta_action_handler' ), 10, 3 );
- add_action( 'update_postmeta', array( $this, 'postmeta_action_handler' ), 10, 3 );
- add_action( 'delete_postmeta', array( $this, 'postmeta_action_handler' ), 10, 3 );
-
- // Links
- add_action( 'edit_link', array( $this, 'link_action_handler' ) );
- add_action( 'add_link', array( $this, 'link_action_handler' ) );
- add_action( 'delete_link', array( $this, 'link_action_handler' ) );
-
- // Taxonomy
- add_action( 'created_term', array( $this, 'term_handler' ), 2 );
- add_action( 'edited_terms', array( $this, 'term_handler' ), 2 );
- add_action( 'delete_term', array( $this, 'term_handler' ), 2 );
- add_action( 'edit_term_taxonomy', array( $this, 'term_taxonomy_handler' ) );
- add_action( 'delete_term_taxonomy', array( $this, 'term_taxonomy_handler' ) );
- add_action( 'edit_term_taxonomies', array( $this, 'term_taxonomies_handler' ) );
- add_action( 'add_term_relationship', array( $this, 'term_relationship_handler' ), 10, 2 );
- add_action( 'delete_term_relationships', array( $this, 'term_relationships_handler' ), 10, 2 );
- add_action( 'set_object_terms', array( $this, 'set_object_terms_handler' ), 10, 3 );
-
- // Files
- if ( $this->is_main_site() ) {
- add_action( 'switch_theme', array( $this, 'theme_action_handler' ) );
- add_action( 'activate_plugin', array( $this, 'plugin_action_handler' ) );
- add_action( 'deactivate_plugin', array( $this, 'plugin_action_handler' ) );
- }
- add_action( 'wp_handle_upload', array( $this, 'upload_handler' ) );
-
- // Options
- add_action( 'deleted_option', array( $this, 'option_handler' ), 1 );
- add_action( 'updated_option', array( $this, 'option_handler' ), 1 );
- add_action( 'added_option', array( $this, 'option_handler' ), 1 );
-
- $this->add_vp_required_filters();
- }
-
- function add_vp_required_filters() {
- // Log ins
- if ( $this->get_option( 'login_lockdown' ) ) {
- add_action( 'login_form', array( $this, 'add_js_token' ) );
- add_filter( 'authenticate', array( $this, 'authenticate' ), 999 );
- }
-
- // Report back to VaultPress
- add_action( 'shutdown', array( $this, 'do_pings' ) );
-
- // VaultPress likes being first in line
- add_filter( 'pre_update_option_active_plugins', array( $this, 'load_first' ) );
- }
-}
-
-$vaultpress = VaultPress::init();
-
-if ( isset( $_GET['vaultpress'] ) && $_GET['vaultpress'] ) {
- if ( !function_exists( 'wp_magic_quotes' ) ) {
- // If already slashed, strip.
- if ( get_magic_quotes_gpc() ) {
- $_GET = stripslashes_deep( $_GET );
- $_POST = stripslashes_deep( $_POST );
- $_COOKIE = stripslashes_deep( $_COOKIE );
- }
-
- // Escape with wpdb.
- $_GET = add_magic_quotes( $_GET );
- $_POST = add_magic_quotes( $_POST );
- $_COOKIE = add_magic_quotes( $_COOKIE );
- $_SERVER = add_magic_quotes( $_SERVER );
-
- // Force REQUEST to be GET + POST. If SERVER, COOKIE, or ENV are needed, use those superglobals directly.
- $_REQUEST = array_merge( $_GET, $_POST );
- } else {
- wp_magic_quotes();
- }
-
- if ( !function_exists( 'wp_get_current_user' ) )
- include ABSPATH . '/wp-includes/pluggable.php';
-
- // TODO: this prevents some error notices but do we need it? is there a better way to check capabilities/logged in user/etc?
- if ( function_exists( 'wp_cookie_constants' ) && !defined( 'AUTH_COOKIE' ) )
- wp_cookie_constants();
-
- $vaultpress->parse_request( null );
-
- die();
-}
-
-// only load hotfixes if it's not a VP request
-require_once( dirname( __FILE__ ) . '/class.vaultpress-hotfixes.php' );
-$hotfixes = new VaultPress_Hotfixes();
-
-include_once( dirname( __FILE__ ) . '/cron-tasks.php' );
diff --git a/plugins/vaultpress/vp-scanner.php b/plugins/vaultpress/vp-scanner.php
deleted file mode 100644
index 72ca9f46..00000000
--- a/plugins/vaultpress/vp-scanner.php
+++ /dev/null
@@ -1,153 +0,0 @@
-last_dir = $this->path = @realpath( $path );
- else
- $this->last_dir = $this->path = dirname( @realpath( $path ) );
- $this->ignore_symlinks = $ignore_symlinks;
- }
-
- function get_files( $limit = 100 ) {
- $files = array();
- if ( is_dir( $this->last_dir ) ) {
- $return = $this->_scan_files( $this->path, $files, $this->offset, $limit, $this->last_dir );
- $this->offset = $return[0];
- $this->last_dir = $return[1];
- if ( count( $files ) < $limit )
- $this->last_dir = false;
- }
- return $files;
- }
-
- function _scan_files( $path, &$files, $offset, $limit, &$last_dir ) {
- $_offset = 0;
- if ( is_readable( $path ) && $handle = opendir( $path ) ) {
- while( false !== ( $entry = readdir( $handle ) ) ) {
- if ( '.' == $entry || '..' == $entry )
- continue;
-
- $_offset++;
- $full_entry = $path . DIRECTORY_SEPARATOR . $entry;
- $next_item = ltrim( str_replace( $path, '', $last_dir ), DIRECTORY_SEPARATOR );
- $next = preg_split( '#(?ignore_symlinks && is_link( $full_entry ) )
- continue;
-
- if ( rtrim( $last_dir, DIRECTORY_SEPARATOR ) == rtrim( $path, DIRECTORY_SEPARATOR ) ) {
- // Reset last_dir and offset when we reached the previous last_dir value.
- $last_dir = '';
- $offset = 0;
- }
-
- if ( is_file( $full_entry ) ) {
- if ( !vp_is_interesting_file( $full_entry ) )
- continue;
- $_return_offset = $_offset;
- $_return_dir = dirname( $full_entry );
- $files[] = $full_entry;
- } elseif ( is_dir( $full_entry ) ) {
- list( $_return_offset, $_return_dir ) = $this->_scan_files( $full_entry, $files, $offset, $limit, $last_dir );
- }
- if ( count( $files ) >= $limit ) {
- closedir( $handle );
- return array( $_return_offset, $_return_dir );
- }
- }
- closedir( $handle );
- }
- return array( $_offset, $path );
- }
-}
-
-function vp_get_real_file_path( $file_path, $tmp_file = false ) {
- global $site, $site_id;
- $site_id = !empty( $site->id ) ? $site->id : $site_id;
- if ( !$tmp_file && !empty( $site_id ) && function_exists( 'determine_file_type_path' ) ) {
- $path = determine_file_type_path( $file_path );
- $file = file_by_path( $site_id, $path );
- if ( !$file )
- return false;
- return $file->get_unencrypted();
- }
- return !empty( $tmp_file ) ? $tmp_file : $file_path;
-}
-
-function vp_is_interesting_file($file) {
- $scan_only_regex = apply_filters( 'scan_only_extension_regex', '#\.(ph(p3|p4|p5|p|tml)|html|js|htaccess)$#i' );
- return preg_match( $scan_only_regex, $file );
-}
-
-/**
- * Scans a file with the registered signatures. To report a security notice for a specified signature, all its regular
- * expressions should result in a match.
- * @param $file the filename to be scanned.
- * @param null $tmp_file used if the file to be scanned doesn't exist or if the filename doesn't match vp_is_interesting_file().
- * @return array|bool false if no matched signature is found. A list of matched signatures otherwise.
- */
-function vp_scan_file($file, $tmp_file = null) {
- $real_file = vp_get_real_file_path( $file, $tmp_file );
- $file_size = file_exists( $real_file ) ? @filesize( $real_file ) : 0;
- if ( !is_readable( $real_file ) || !$file_size || $file_size > apply_filters( 'scan_max_file_size', 3 * 1024 * 1024 ) ) // don't scan empty or files larger than 3MB.
- return false;
-
- $file_content = null;
- $skip_file = apply_filters_ref_array( 'pre_scan_file', array ( false, $file, $real_file, &$file_content ) );
- if ( false !== $skip_file ) // maybe detect malware without regular expressions.
- return $skip_file;
-
- if ( !vp_is_interesting_file( $file ) ) // only scan relevant files.
- return false;
-
- if ( !isset( $GLOBALS['vp_signatures'] ) )
- $GLOBALS['vp_signatures'] = array();
-
- $found = array ();
- foreach ( $GLOBALS['vp_signatures'] as $signature ) {
- if ( !is_object( $signature ) || !isset( $signature->patterns ) )
- continue;
- // if there is no filename_regex, we assume it's the same of vp_is_interesting_file().
- if ( empty( $signature->filename_regex ) || preg_match( '#' . addcslashes( $signature->filename_regex, '#' ) . '#i', $file ) ) {
- if ( null === $file_content || !is_array( $file_content ) )
- $file_content = file( $real_file );
-
- $is_vulnerable = true;
- $matches = array ();
- if ( is_array( $file_content ) && ( $signature->patterns ) && is_array( $signature->patterns ) ) {
- reset( $signature->patterns );
- while ( $is_vulnerable && list( , $pattern ) = each( $signature->patterns ) ) {
- if ( ! $match = preg_grep( '#' . addcslashes( $pattern, '#' ) . '#im', $file_content ) ) {
- $is_vulnerable = false;
- break;
- }
- $matches += $match;
- }
- } else {
- $is_vulnerable = false;
- }
- $debug_data = array( 'matches' => $matches );
- // Additional checking needed?
- if ( method_exists( $signature, 'get_detailed_scanner' ) && $scanner = $signature->get_detailed_scanner() )
- $is_vulnerable = $scanner->scan( $is_vulnerable, $file, $real_file, $file_content, $debug_data );
- if ( $is_vulnerable ) {
- $found[$signature->id] = $debug_data;
- if ( isset( $signature->severity ) && $signature->severity > 8 ) // don't continue scanning
- break;
- }
- }
- }
-
- return apply_filters_ref_array( 'post_scan_file', array ( $found, $file, $real_file, &$file_content ) );
-}
diff --git a/responsive.html b/responsive.html
deleted file mode 100644
index 559da254..00000000
--- a/responsive.html
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-
- Responsive Design Testing
-
-
-
-
-
-
320 × 480 (mobile)
-
-
-
-
480 × 640 (small tablet)
-
-
-
-
768 × 1024 (tablet - portrait)
-
-
-
-
1024 × 768 (tablet - landscape)
-
-
-
-
1200 × 800 (desktop)
-
-
-
-
-
\ No newline at end of file
diff --git a/sites.php b/sites.php
index 9dc045ee..1d45eb42 100644
--- a/sites.php
+++ b/sites.php
@@ -5,312 +5,443 @@ function jquery_sites() {
if ( isset( $sites ) )
return $sites;
- $sites = array( /* blog_id, cookie domain */
+ # Historical: Formerly hosted plugins.jquery.com
+ # Historical: Formerly hosted qunitjs.com
+ # Historical: Formerly hosted sizzlejs.com
+ # Historical: Formerly hosted api.qunitjs.com
+ # Historical: Formerly hosted books.jquery.com
+ # Historical: Formerly hosted events.jquery.org
+ # Historical: Formerly hosted irc.jquery.org.
+ # Historical: Formerly hosted codeorigin.jquery.com
+
+ $sites = array(
'jquery.com' => array(
- 'blog_id' => 1,
'cookie_domain' => '.jquery.com',
- 'body_class' => 'jquery',
'options' => array(
'blogname' => 'jQuery',
'stylesheet' => 'jquery.com',
'active_plugins' => array(
'jquery-static-index.php',
- 'vaultpress/vaultpress.php',
),
+ 'jquery_body_class' => 'jquery',
+ 'jquery_description' => 'jQuery: The Write Less, Do More, JavaScript Library',
+ 'jquery_xfn_rel_me' => 'https://social.lfx.dev/@jquery',
+ 'jquery_typesense_key' => 'Zh8mMgohXECel9wjPwqT7lekLSG3OCgz',
+ 'jquery_typesense_collection' => 'jquery_com',
),
),
'blog.jquery.com' => array(
- 'blog_id' => 2,
'cookie_domain' => '.jquery.com',
- 'body_class' => 'jquery',
'options' => array(
- 'blogname' => 'jQuery Blog',
- 'stylesheet' => 'blog-jquery-com',
- // 'permalink_structure' => '/%category%/%postname%/',
+ 'blogname' => 'Official jQuery Blog',
+ 'blogdescription' => 'New Wave JavaScript',
+ 'permalink_structure' => '/%year%/%monthnum%/%day%/%postname%/',
+ 'stylesheet' => 'jquery.com',
+ 'jquery_body_class' => 'jquery',
+ 'jquery_is_blog' => true,
+ 'jquery_author' => 'jQuery Team',
+ 'jquery_description' => 'jQuery: The Write Less, Do More, JavaScript Library',
+ 'jquery_xfn_rel_me' => 'https://social.lfx.dev/@jquery',
),
),
'api.jquery.com' => array(
- 'blog_id' => 3,
'cookie_domain' => '.jquery.com',
- 'body_class' => 'jquery',
- 'logo_link' => 'http://jquery.com/',
'options' => array(
'blogname' => 'jQuery API Documentation',
'stylesheet' => 'api.jquery.com',
- ),
- ),
- 'plugins.jquery.com' => array(
- 'blog_id' => 4,
- 'cookie_domain' => '.jquery.com',
- 'body_class' => 'jquery',
- 'options' => array(
- 'blogname' => 'jQuery Plugin Registry',
- 'stylesheet' => 'plugins.jquery.com',
+ 'active_plugins' => array(
+ 'jquery-api-category-listing.php',
+ ),
+ 'jquery_body_class' => 'jquery',
+ 'jquery_logo_link'=> 'https://jquery.com/',
+ 'jquery_typesense_key' => 'Zh8mMgohXECel9wjPwqT7lekLSG3OCgz',
+ 'jquery_typesense_collection' => 'jquery_com',
),
),
'learn.jquery.com' => array(
- 'blog_id' => 5,
'cookie_domain' => '.jquery.com',
- 'body_class' => 'jquery-learn',
'options' => array(
'blogname' => 'jQuery Learning Center',
'stylesheet' => 'learn.jquery.com',
'active_plugins' => array(
'jquery-static-index.php',
),
+ 'jquery_body_class' => 'jquery-learn',
),
),
'jqueryui.com' => array(
- 'blog_id' => 6,
'cookie_domain' => '.jqueryui.com',
- 'body_class' => 'jquery-ui',
'options' => array(
'blogname' => 'jQuery UI',
+ 'jquery_description' => 'jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library. Whether you\'re building highly interactive web applications or you just need to add a date picker to a form control, jQuery UI is the perfect choice.',
'stylesheet' => 'jqueryui.com',
'active_plugins' => array(
'jquery-static-index.php',
),
+ 'jquery_body_class' => 'jquery-ui',
+ 'jquery_typesense_key' => 'Zh8mMgohXECel9wjPwqT7lekLSG3OCgz',
+ 'jquery_typesense_collection' => 'jqueryui_com',
+ 'jquery_twitter_link' => 'https://twitter.com/jqueryui',
),
),
'blog.jqueryui.com' => array(
- 'blog_id' => 7,
'cookie_domain' => '.jqueryui.com',
- 'body_class' => 'jquery-ui',
'options' => array(
'blogname' => 'jQuery UI Blog',
- 'stylesheet' => 'blog.jqueryui.com',
+ 'blogdescription' => 'All news about jQuery UI',
+ 'permalink_structure' => '/%year%/%monthnum%/%postname%/',
+ 'stylesheet' => 'jqueryui.com',
+ 'jquery_body_class' => 'jquery-ui',
+ 'jquery_is_blog' => true,
+ 'jquery_author' => 'jQuery Team',
+ 'jquery_description' => 'jQuery: The Write Less, Do More, JavaScript Library',
+ 'jquery_twitter_link' => 'https://twitter.com/jqueryui',
),
),
'api.jqueryui.com' => array(
- 'subsites' => 1, // Has one level of sub-sites (api.jqueryui.com/([^/]+))
- 'blog_id' => 8,
+ 'subsites' => true, // Has one level of sub-sites (api.jqueryui.com/([^/]+))
'cookie_domain' => '.jqueryui.com',
- 'body_class' => 'jquery-ui',
- 'logo_link' => 'http://jqueryui.com/',
'options' => array(
'blogname' => 'jQuery UI API Documentation',
'stylesheet' => 'api.jqueryui.com',
- 'active_plugins' => array(),
+ 'active_plugins' => array(
+ 'jquery-api-category-listing.php',
+ ),
+ 'jquery_body_class' => 'jquery-ui',
+ 'jquery_logo_link'=> 'https://jqueryui.com/',
+ 'jquery_typesense_key' => 'Zh8mMgohXECel9wjPwqT7lekLSG3OCgz',
+ 'jquery_typesense_collection' => 'jqueryui_com',
+ 'jquery_twitter_link' => 'https://twitter.com/jqueryui',
),
),
'api.jqueryui.com/1.8' => array(
- 'blog_id' => 17,
'cookie_domain' => '.jqueryui.com',
- 'body_class' => 'jquery-ui',
- 'logo_link' => 'http://jqueryui.com/',
'options' => array(
'blogname' => 'jQuery UI 1.8 Documentation',
'stylesheet' => 'api.jqueryui.com',
- 'active_plugins' => array(),
+ 'active_plugins' => array(
+ 'jquery-api-category-listing.php',
+ 'jquery-api-versioned-links.php',
+ ),
+ 'jquery_body_class' => 'jquery-ui',
+ 'jquery_logo_link'=> 'https://jqueryui.com/',
+ 'jquery_typesense_key' => 'Zh8mMgohXECel9wjPwqT7lekLSG3OCgz',
+ 'jquery_typesense_collection' => 'jqueryui_com',
+ 'jquery_twitter_link' => 'https://twitter.com/jqueryui',
),
),
'api.jqueryui.com/1.9' => array(
- 'blog_id' => 21,
'cookie_domain' => '.jqueryui.com',
- 'body_class' => 'jquery-ui',
- 'logo_link' => 'http://jqueryui.com/',
'options' => array(
'blogname' => 'jQuery UI 1.9 Documentation',
'stylesheet' => 'api.jqueryui.com',
- 'active_plugins' => array(),
+ 'active_plugins' => array(
+ 'jquery-api-category-listing.php',
+ 'jquery-api-versioned-links.php',
+ ),
+ 'jquery_body_class' => 'jquery-ui',
+ 'jquery_logo_link'=> 'https://jqueryui.com/',
+ 'jquery_typesense_key' => 'Zh8mMgohXECel9wjPwqT7lekLSG3OCgz',
+ 'jquery_typesense_collection' => 'jqueryui_com',
+ 'jquery_twitter_link' => 'https://twitter.com/jqueryui',
),
),
'jquery.org' => array(
- 'blog_id' => 9,
'cookie_domain' => '.jquery.org',
- 'body_class' => 'jquery-foundation',
'options' => array(
'blogname' => 'jQuery Foundation',
'stylesheet' => 'jquery.org',
'active_plugins' => array(
'jquery-static-index.php',
),
- ),
- ),
- 'qunitjs.com' => array(
- 'blog_id' => 10,
- 'cookie_domain' => '.qunitjs.com',
- 'body_class' => 'qunitjs',
- 'options' => array(
- 'blogname' => 'QUnit',
- 'stylesheet' => 'qunitjs.com',
- 'active_plugins' => array(
- 'jquery-static-index.php',
- ),
- ),
- ),
- 'sizzlejs.com' => array(
- 'blog_id' => 11,
- 'cookie_domain' => '.sizzlejs.com',
- 'body_class' => 'sizzlejs',
- 'options' => array(
- 'blogname' => 'Sizzle JS',
- 'stylesheet' => 'sizzlejs.com',
- 'active_plugins' => array(
- 'jquery-static-index.php',
- ),
+ 'jquery_body_class' => 'jquery-foundation',
),
),
'jquerymobile.com' => array(
- 'blog_id' => 12,
'cookie_domain' => '.jquerymobile.com',
- 'body_class' => 'jquery-mobile',
'options' => array(
'blogname' => 'jQuery Mobile',
'stylesheet' => 'jquerymobile.com',
'active_plugins' => array(
'jquery-static-index.php',
),
+ 'jquery_body_class' => 'jquery-mobile',
+ 'jquery_typesense_key' => 'Zh8mMgohXECel9wjPwqT7lekLSG3OCgz',
+ 'jquery_typesense_collection' => 'jquerymobile_com',
+ 'jquery_twitter_link' => 'https://twitter.com/jquerymobile',
),
),
'api.jquerymobile.com' => array(
- 'subsites' => 1, // Has one level of sub-sites (api.jquerymobile.com/([^/]+))
- 'blog_id' => 13,
+ 'subsites' => true, // Has one level of sub-sites (api.jquerymobile.com/([^/]+))
'cookie_domain' => '.jquerymobile.com',
- 'body_class' => 'jquery-mobile',
- 'logo_link' => 'http://jquerymobile.com/',
'options' => array(
'blogname' => 'jQuery Mobile API Documentation',
'stylesheet' => 'api.jquerymobile.com',
- 'active_plugins' => array(),
- ),
- ),
- 'api.qunitjs.com' => array(
- 'blog_id' => 14,
- 'cookie_domain' => '.qunitjs.com',
- 'body_class' => 'qunitjs',
- 'logo_link' => 'http://qunitjs.com/',
- 'options' => array(
- 'blogname' => 'QUnit API Documentation',
- 'stylesheet' => 'api.qunitjs.com',
'active_plugins' => array(
- 'jquery-static-index.php',
+ 'jquery-api-category-listing.php',
),
+ 'jquery_body_class' => 'jquery-mobile',
+ 'jquery_logo_link'=> 'https://jquerymobile.com/',
+ 'jquery_typesense_key' => 'Zh8mMgohXECel9wjPwqT7lekLSG3OCgz',
+ 'jquery_typesense_collection' => 'jquerymobile_com',
+ 'jquery_twitter_link' => 'https://twitter.com/jquerymobile',
),
),
- 'books.jquery.com' => array(
- 'blog_id' => 15,
- 'cookie_domain' => '.jquery.com',
- 'body_class' => 'jquery',
- 'options' => array(
- 'blogname' => 'jQuery Books',
- 'stylesheet' => 'books.jquery.com',
- ),
- ),
- 'events.jquery.org' => array(
- 'blog_id' => 16,
- 'cookie_domain' => '.jquery.org',
- 'body_class' => 'jquery-foundation jquery-events',
+ 'blog.jquerymobile.com' => array(
+ 'cookie_domain' => '.jquerymobile.com',
'options' => array(
- 'blogname' => 'jQuery Events',
- 'stylesheet' => 'events.jquery.org',
- 'active_plugins' => array(
- 'allow-numeric-stubs/allow-numeric-stubs.php',
- 'jquery-static-index.php',
- ),
+ 'blogname' => 'jQuery Mobile Blog',
+ 'permalink_structure' => '/%year%/%monthnum%/%day%/%postname%/',
+ 'stylesheet' => 'jquerymobile.com',
+ 'jquery_body_class' => 'jquery-mobile',
+ 'jquery_is_blog' => true,
+ 'jquery_author' => 'jQuery Team',
+ 'jquery_description' => 'jQuery: The Write Less, Do More, JavaScript Library',
+ 'jquery_twitter_link' => 'https://twitter.com/jquerymobile',
),
),
'brand.jquery.org' => array(
- 'blog_id' => 18,
'cookie_domain' => '.jquery.org',
- 'body_class' => 'jquery-foundation',
'options' => array(
'blogname' => 'jQuery Brand Guidelines',
'stylesheet' => 'brand.jquery.org',
'active_plugins' => array(
'jquery-static-index.php',
),
+ 'jquery_body_class' => 'jquery-foundation',
),
),
'contribute.jquery.org' => array(
- 'blog_id' => 19,
'cookie_domain' => '.jquery.org',
- 'body_class' => 'jquery-foundation',
'options' => array(
'blogname' => 'Contribute to jQuery',
'stylesheet' => 'contribute.jquery.org',
'active_plugins' => array(
'jquery-static-index.php',
),
+ 'jquery_body_class' => 'jquery-foundation',
),
),
- 'irc.jquery.org' => array(
- 'blog_id' => 20,
+ 'meetings.jquery.org' => array(
'cookie_domain' => '.jquery.org',
- 'body_class' => 'jquery-foundation',
'options' => array(
- 'blogname' => 'jQuery IRC Center',
- 'stylesheet' => 'irc.jquery.org',
+ 'blogname' => 'jQuery Meetings',
+ 'stylesheet' => 'meetings.jquery.org',
'active_plugins' => array(
'jquery-static-index.php',
),
+ 'jquery_body_class' => 'jquery-foundation',
),
),
- 'meetings.jquery.org' => array(
- 'blog_id' => 22,
- 'cookie_domain' => '.jquery.org',
- 'body_class' => 'jquery-foundation',
+ 'api.jquerymobile.com/1.3' => array(
+ 'cookie_domain' => '.jquerymobile.com',
'options' => array(
- 'blogname' => 'jQuery Meetings',
- 'stylesheet' => 'meetings.jquery.org',
+ 'blogname' => 'jQuery Mobile 1.3 Documentation',
+ 'stylesheet' => 'api.jquerymobile.com',
'active_plugins' => array(
- 'jquery-static-index.php',
+ 'jquery-api-category-listing.php',
+ 'jquery-api-versioned-links.php',
+ ),
+ 'jquery_body_class' => 'jquery-mobile',
+ 'jquery_logo_link'=> 'https://jquerymobile.com/',
+ 'jquery_typesense_key' => 'Zh8mMgohXECel9wjPwqT7lekLSG3OCgz',
+ 'jquery_typesense_collection' => 'jquerymobile_com',
+ 'jquery_twitter_link' => 'https://twitter.com/jquerymobile',
+ ),
+ ),
+ 'api.jqueryui.com/1.10' => array(
+ 'cookie_domain' => '.jqueryui.com',
+ 'options' => array(
+ 'blogname' => 'jQuery UI 1.10 Documentation',
+ 'stylesheet' => 'api.jqueryui.com',
+ 'active_plugins' => array(
+ 'jquery-api-category-listing.php',
+ 'jquery-api-versioned-links.php',
+ ),
+ 'jquery_body_class' => 'jquery-ui',
+ 'jquery_logo_link'=> 'https://jqueryui.com/',
+ 'jquery_typesense_key' => 'Zh8mMgohXECel9wjPwqT7lekLSG3OCgz',
+ 'jquery_typesense_collection' => 'jqueryui_com',
+ 'jquery_twitter_link' => 'https://twitter.com/jqueryui',
+ ),
+ ),
+ 'api.jqueryui.com/1.12' => array(
+ 'cookie_domain' => '.jqueryui.com',
+ 'options' => array(
+ 'blogname' => 'jQuery UI 1.12 Documentation',
+ 'stylesheet' => 'api.jqueryui.com',
+ 'active_plugins' => array(
+ 'jquery-api-category-listing.php',
+ 'jquery-api-versioned-links.php',
),
+ 'jquery_body_class' => 'jquery-ui',
+ 'jquery_logo_link'=> 'https://jqueryui.com/',
+ 'jquery_typesense_key' => 'Zh8mMgohXECel9wjPwqT7lekLSG3OCgz',
+ 'jquery_typesense_collection' => 'jqueryui_com',
+ 'jquery_twitter_link' => 'https://twitter.com/jqueryui',
),
),
- 'codeorigin.jquery.com' => array(
- 'blog_id' => 23,
+ 'api.jqueryui.com/1.11' => array(
+ 'cookie_domain' => '.jqueryui.com',
+ 'options' => array(
+ 'blogname' => 'jQuery UI 1.11 Documentation',
+ 'stylesheet' => 'api.jqueryui.com',
+ 'active_plugins' => array(
+ 'jquery-api-category-listing.php',
+ 'jquery-api-versioned-links.php',
+ ),
+ 'jquery_body_class' => 'jquery-ui',
+ 'jquery_logo_link'=> 'https://jqueryui.com/',
+ 'jquery_typesense_key' => 'Zh8mMgohXECel9wjPwqT7lekLSG3OCgz',
+ 'jquery_typesense_collection' => 'jqueryui_com',
+ 'jquery_twitter_link' => 'https://twitter.com/jqueryui',
+ ),
+ ),
+ 'api.jquerymobile.com/1.4' => array(
+ 'cookie_domain' => '.jquerymobile.com',
+ 'options' => array(
+ 'blogname' => 'jQuery Mobile 1.4 Documentation',
+ 'stylesheet' => 'api.jquerymobile.com',
+ 'active_plugins' => array(
+ 'jquery-api-category-listing.php',
+ 'jquery-api-versioned-links.php',
+ ),
+ 'jquery_body_class' => 'jquery-mobile',
+ 'jquery_logo_link'=> 'https://jquerymobile.com/',
+ 'jquery_typesense_key' => 'Zh8mMgohXECel9wjPwqT7lekLSG3OCgz',
+ 'jquery_typesense_collection' => 'jquerymobile_com',
+ 'jquery_twitter_link' => 'https://twitter.com/jquerymobile',
+ ),
+ ),
+ 'releases.jquery.com' => array(
'cookie_domain' => '.jquery.com',
- 'body_class' => 'jquery',
'options' => array(
'blogname' => 'jQuery CDN',
- 'stylesheet' => 'codeorigin.jquery.com',
+ 'jquery_description' => 'Worldwide distribution of jQuery releases.',
+ 'stylesheet' => 'releases.jquery.com',
'active_plugins' => array(
'jquery-static-index.php',
),
+ 'jquery_body_class' => 'jquery',
),
),
- 'api.jquerymobile.com/1.3' => array(
- 'blog_id' => 24,
- 'cookie_domain' => '.jquerymobile.com',
- 'body_class' => 'jquery-mobile',
- 'logo_link' => 'http://jquerymobile.com/',
+ 'api.jqueryui.com/1.13' => array(
+ 'cookie_domain' => '.jqueryui.com',
'options' => array(
- 'blogname' => 'jQuery Mobile 1.3 Documentation',
- 'stylesheet' => 'api.jquerymobile.com',
- 'active_plugins' => array(),
+ 'blogname' => 'jQuery UI 1.13 Documentation',
+ 'stylesheet' => 'api.jqueryui.com',
+ 'active_plugins' => array(
+ 'jquery-api-category-listing.php',
+ 'jquery-api-versioned-links.php',
+ ),
+ 'jquery_body_class' => 'jquery-ui',
+ 'jquery_logo_link'=> 'https://jqueryui.com/',
+ 'jquery_typesense_key' => 'Zh8mMgohXECel9wjPwqT7lekLSG3OCgz',
+ 'jquery_typesense_collection' => 'jqueryui_com',
+ 'jquery_twitter_link' => 'https://twitter.com/jqueryui',
),
),
- 'api.jqueryui.com/1.10' => array(
- 'blog_id' => 25,
+ 'api.jqueryui.com/1.14' => array(
'cookie_domain' => '.jqueryui.com',
- 'body_class' => 'jquery-ui',
- 'logo_link' => 'http://jqueryui.com/',
'options' => array(
- 'blogname' => 'jQuery UI 1.10 Documentation',
+ 'blogname' => 'jQuery UI 1.14 Documentation',
'stylesheet' => 'api.jqueryui.com',
- 'active_plugins' => array(),
+ 'active_plugins' => array(
+ 'jquery-api-category-listing.php',
+ 'jquery-api-versioned-links.php',
+ ),
+ 'jquery_body_class' => 'jquery-ui',
+ 'jquery_logo_link'=> 'https://jqueryui.com/',
+ 'jquery_typesense_key' => 'Zh8mMgohXECel9wjPwqT7lekLSG3OCgz',
+ 'jquery_typesense_collection' => 'jqueryui_com',
+ 'jquery_twitter_link' => 'https://twitter.com/jqueryui',
),
),
);
- uasort( $sites, function( $a, $b ) {
- if ( $a['blog_id'] == $b['blog_id'] )
- die( 'Two sites have the same blog_id.' );
- if ( $a['blog_id'] > $b['blog_id'] )
- return 1;
- return -1;
- } );
return $sites;
}
+/**
+ * Resolve a canonical site (e.g. JQUERY_LIVE_SITE) into one for
+ * the current environment. This exists to automatically change
+ * the site hostname if JQUERY_STAGING is true.
+ *
+ * This is cheap and can be applied at the last minute as-needed.
+ *
+ * @param string $site
+ * @return string
+ */
+function jquery_site_expand( $site ) {
+ if ( JQUERY_STAGING ) {
+ return strtr( JQUERY_STAGING_FORMAT, [ '%s' => $site ] );
+ }
+ return $site;
+}
+
+/**
+ * @param string $site E.g. `$_SERVER['HTTP_HOST']`
+ * @return string
+ */
+function jquery_site_extract( $hostname ) {
+ $live_site = preg_replace( '/:\d+$/', '', strtolower( $hostname ) );
+ if ( JQUERY_STAGING ) {
+ // Convert the format into a regex that matches the placeholder
+ // Strip port from both because the webserver may internally have
+ // a different port from the public one
+ $rPortless = preg_quote( preg_replace( '/:\d+$/', '', JQUERY_STAGING_FORMAT ), '/' );
+ $rPortless = strtr( $rPortless, [ '%s' => '(.+)' ] );
+ $rPortless = "/^{$rPortless}$/";
+ if ( preg_match( $rPortless, $live_site, $m ) ) {
+ $live_site = $m[1];
+ }
+ }
+ return $live_site;
+}
+
function jquery_default_site_options() {
- return array(
+ $defaults = array(
'enable_xmlrpc' => 1,
'template' => 'jquery',
'blogdescription' => '',
'permalink_structure' => '/%postname%/',
'use_smilies' => 0,
+
+ 'close_comments_days_old' => 14,
+ 'close_comments_for_old_posts' => 1,
+ 'comment_moderation' => 1,
+ 'comments_notify' => 0,
+ 'default_comment_status' => 'closed',
+ 'default_ping_status' => 'closed',
+ 'show_comments_cookies_opt_in' => 0,
+
+ // The one site where comments are sometimes enabled (blog.jquery.com)
+ // has always had thread_comments turned off.
+ //
+ // Other sites like api.jquery.com implement their pages as posts,
+ // but naturally don't support comments at all. Turn this off to
+ // remove the WordPress comment-reply script from pages by default.
+ 'thread_comments' => 0,
);
+ // Production databases set the home values in corresponding site options tables.
+ // However, sites that use jquery-static-index.php cause index pages
+ // to redirect to live sites in local development. This filter does not
+ // prevent the redirect, but changes the redirect to the local site.
+ //
+ // WordPress/wp-login.php requires 'home' to use a full URL.
+ // If it uses a protocol-relative URL, it uses the entire URL as the "path="
+ // and thus cause cookies to never be sent by the browser. This doesn't matter
+ // much for the public stage sites where we don't login, but it matters for
+ // jquery-wp-docker.
+ //
+ // To ensure canonical URLs work correctly on public stage sites and avoid
+ // HTTP-403 errors, apply set_url_scheme() which will change it to stay on
+ // HTTPS if you're already on HTTPS.
+ if ( JQUERY_STAGING ) {
+ $defaults['home'] = set_url_scheme( 'http://' . jquery_site_expand( JQUERY_LIVE_SITE ) );
+ $defaults['siteurl'] = set_url_scheme( 'http://' . jquery_site_expand( JQUERY_LIVE_SITE ) );
+ }
+ return $defaults;
+
}
diff --git a/sunrise.php b/sunrise.php
deleted file mode 100644
index 6afae974..00000000
--- a/sunrise.php
+++ /dev/null
@@ -1,56 +0,0 @@
-site_name ) )
- $current_site->site_name = 'jQuery';
- $current_blog = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->blogs WHERE blog_id = %d", $blog_id ) );
-
- // Can't find the site in the DB:
- if ( ! is_object( $current_blog ) ) {
- $current_blog = new stdClass;
- $current_blog->blog_id = $current_blog->site_id = $current_blog->public = 1;
- $current_blog->archived = $current_blog->deleted = $current_blog->spam = 0;
-
- add_filter( 'ms_site_check', '__return_true' );
-
- if ( ! defined( 'WP_INSTALLING' ) ) {
- // Okay, see if we can find the main site in the DB.
- // If not, time for a new network install.
- if ( 1 == $blog_id || ! $wpdb->get_var( "SELECT blog_id FROM $wpdb->blogs WHERE blog_id = 1" ) ) {
- require( ABSPATH . WPINC . '/kses.php' );
- require( ABSPATH . WPINC . '/pluggable.php' );
- require( ABSPATH . WPINC . '/formatting.php' );
- wp_redirect( 'http://' . DOMAIN_CURRENT_SITE . '/wp-admin/install.php' );
- die();
- }
-
- // Otherwise, we have a working network, but have a new site to install. Do that now.
- define( 'WP_INSTALLING', true );
- add_action( 'init', function() use ( $blog_id ) {
- global $wpdb;
- $wpdb->set_blog_id( $blog_id );
- if ( is_super_admin() ) {
- $super_admin = wp_get_current_user();
- } else {
- $super_admins = get_super_admins();
- $super_admin = get_user_by( 'login', reset( $super_admins ) );
- }
- require ABSPATH . 'wp-admin/includes/upgrade.php';
- $sites = jquery_sites();
- $site = str_replace( JQUERY_STAGING_PREFIX, '', $_SERVER['HTTP_HOST'] );
- if ( ! empty( $sites[ $site ]['subsites'] ) ) {
- list( $first_path_segment ) = explode( '/', trim( $_SERVER['REQUEST_URI'], '/' ), 2 );
- if ( $first_path_segment && isset( $sites[ $site . '/' . $first_path_segment ] ) )
- $site .= '/' . $first_path_segment;
- }
-
- jquery_install_site( $site, $super_admin );
- wp_safe_redirect( 'http://' . JQUERY_STAGING_PREFIX . $site );
- exit;
- } );
- }
- }
-}
\ No newline at end of file
diff --git a/themes/api.jquery.com/functions.php b/themes/api.jquery.com/functions.php
new file mode 100644
index 00000000..1a47f39a
--- /dev/null
+++ b/themes/api.jquery.com/functions.php
@@ -0,0 +1,10 @@
+
jQuery API
-
jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers. If you're new to jQuery, we recommend that you check out the jQuery Learning Center .
-
If you're updating to a newer version of jQuery, be sure to read the release notes published on our blog . If you're coming from a version prior 1.9, you should check out the 1.9 Upgrade Guide as well.
+
jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers. If you're new to jQuery, we recommend that you check out the jQuery Learning Center .
+
If you're updating to a newer version of jQuery, be sure to read the release notes published on our blog . If you're coming from a version prior 1.9, you should check out the 1.9 Upgrade Guide as well.
Note that this is the API documentation for jQuery core. Other projects have API docs in other locations:
diff --git a/themes/api.jquery.com/style.css b/themes/api.jquery.com/style.css
index 209a933d..c4febe38 100755
--- a/themes/api.jquery.com/style.css
+++ b/themes/api.jquery.com/style.css
@@ -4,18 +4,43 @@ Template: jquery
*/
a {
- color: #0769AD;
+ color: #0769ad;
}
.signatures li h4 {
- background: #25649F;
+ background: #25649f;
}
.version-details a,
.returns a {
- color: #7ACEF4;
+ color: #7acef4;
}
.versionAdded a {
- color: #7ACEF4;
+ color: #7acef4;
+}
+
+#content figure {
+ box-shadow: 0 0 5px 1px rgba(0, 0, 0, 0.20);
+ margin-bottom: 1.2em;
+}
+#content figure img.column {
+ vertical-align: top;
+ padding: 0;
+}
+#content figcaption {
+ clear: both;
+ box-shadow: none;
+ margin-top: 0;
+ padding-left: 1em;
+}
+
+/* Version support warning at top of API pages */
+
+#version-support-warning {
+ display: flex;
+ align-items: center;
+ gap: 0.5em;
+ padding: 0.5em 0 0.5em 0.5em;
+ line-height: 1.2;
}
diff --git a/themes/api.jquerymobile.com/functions.php b/themes/api.jquerymobile.com/functions.php
index 022c5fab..11fc37fc 100644
--- a/themes/api.jquerymobile.com/functions.php
+++ b/themes/api.jquerymobile.com/functions.php
@@ -3,11 +3,20 @@
function jq_mobile_api_versions() {
// Must be listed with newest first
return array(
+ '1.5' => '2.2 and newer',
'1.4' => '1.8 and newer',
'1.3' => '1.7 and newer',
);
}
+function jq_mobile_ui_api_versions() {
+ return array(
+ '1.5' => '1.12',
+ '1.4' => '1.10',
+ '1.3' => '1.9'
+ );
+}
+
function jq_mobile_api_version_latest() {
$versions = jq_mobile_api_versions();
return key( $versions );
@@ -19,3 +28,10 @@ function jq_mobile_api_version_current() {
$thisVersion[ 1 ] :
jq_mobile_api_version_latest();
}
+
+// Allow inline scripts and styles in API demos
+add_filter( 'jq_content_security_policy', function ( $policy ) {
+ $policy[ 'script-src' ] = "'self' 'unsafe-inline' code.jquery.com";
+ $policy[ 'style-src' ] = "'self' 'unsafe-inline' code.jquery.com";
+ return $policy;
+} );
diff --git a/themes/api.jquerymobile.com/index.php b/themes/api.jquerymobile.com/index.php
index 16f0d893..4026eb0d 100644
--- a/themes/api.jquerymobile.com/index.php
+++ b/themes/api.jquerymobile.com/index.php
@@ -5,6 +5,7 @@
$versions = jq_mobile_api_versions();
$latestVersion = jq_mobile_api_version_latest();
$thisVersion = jq_mobile_api_version_current();
+ $ui_versions = jq_mobile_ui_api_versions();
$rootUrl = $thisVersion === $latestVersion ? '' : "/$thisVersion";
?>
@@ -18,8 +19,8 @@
jQuery Mobile is the easiest way to build sites and apps that are accessible on all
popular smartphone, tablet and desktop devices.
-
If you are new to jQuery Mobile, the introduction to the framework in the
- Demos
+
If you are new to jQuery Mobile, the introduction to the framework in the
+ Demos
would be a good place to start.
This site provides API documentation for jQuery Mobile
@@ -27,11 +28,11 @@
This site provides API documentation for jQuery Mobile .
- We encourage you to upgrade to the latest stable version of jQuery Mobile
+ We encourage you to upgrade to the latest stable version of jQuery Mobile
in order to receive the best support and take advantage of recent bug
fixes and enhancements. Check out the
- upgrade guides
- and changelogs
+ upgrade guides
+ and changelogs
to find out more about upgrading.
@@ -40,11 +41,11 @@
">full listing of entries , or browse by
category from the sidebar.
-
jQuery Mobile
- supports jQuery .
+
jQuery Mobile uses jQuery UI and
+ supports jQuery .
-
See the supported platforms page for a list of all
- operating systems and browsers that are supported by this version of jQuery Mobile.
+
See the supported platforms page for a list of all
+ operating systems and browsers that are supported by this version of jQuery Mobile.
@@ -61,9 +62,9 @@
$url = $version === $latestVersion ? '/' : "/$version/";
echo "
jQuery Mobile $version API Documentation ";
} ?>
-
jQuery Core API Documentation
-
jQuery UI API Documentation
-
jQuery Learning Center
+
jQuery Core API Documentation
+
jQuery UI API Documentation
+
jQuery Learning Center
diff --git a/themes/api.jquerymobile.com/style.css b/themes/api.jquerymobile.com/style.css
index e1c8349b..143451b7 100644
--- a/themes/api.jquerymobile.com/style.css
+++ b/themes/api.jquerymobile.com/style.css
@@ -9,7 +9,7 @@ a {
.version-details a,
.returns a {
- color: #3EB249;
+ color: #3eb249;
}
.signatures li h4 {
diff --git a/themes/api.jqueryui.com/functions.php b/themes/api.jqueryui.com/functions.php
index 29d390db..4f2e6c6e 100644
--- a/themes/api.jqueryui.com/functions.php
+++ b/themes/api.jqueryui.com/functions.php
@@ -1,12 +1,15 @@
"1.6 and newer",
- "1.10" => "1.6 and newer",
- "1.9" => "1.6 and newer",
- "1.8" => "1.3.2 and newer",
+ "1.14" => "latest versions of jQuery 1.x, 2.x, 3.x & 4.x; see the changelogs of a specific release for more detailed support information",
+ "1.13" => "jQuery 1.8 and newer",
+ "1.12" => "jQuery 1.7 and newer",
+ "1.11" => "jQuery 1.6 and newer",
+ "1.10" => "jQuery 1.6 and newer",
+ "1.9" => "jQuery 1.6 and newer",
+ "1.8" => "jQuery 1.3.2 and newer",
);
}
@@ -21,3 +24,10 @@ function jq_ui_api_version_current() {
$thisVersion[ 1 ] :
jq_ui_api_version_latest();
}
+
+// Allow inline scripts and styles in API demos
+add_filter( 'jq_content_security_policy', function ( $policy ) {
+ $policy[ 'script-src' ] = "'self' 'unsafe-inline' code.jquery.com";
+ $policy[ 'style-src' ] = "'self' 'unsafe-inline' code.jquery.com";
+ return $policy;
+} );
diff --git a/themes/api.jqueryui.com/index.php b/themes/api.jqueryui.com/index.php
index ca18a684..f72eaddb 100644
--- a/themes/api.jqueryui.com/index.php
+++ b/themes/api.jqueryui.com/index.php
@@ -18,9 +18,9 @@
jQuery UI is a curated set of user interface interactions, effects,
widgets, and themes built on top of the jQuery JavaScript Library.
If you're new to jQuery UI, you might want to check out our
- main site for
+ main site for
more information and full demos. If you're new to jQuery, you might
- also be interested in the jQuery
+ also be interested in the jQuery
Learning Center tutorials.
This site provides API documentation for jQuery UI . If
@@ -29,18 +29,18 @@
However, we would encourage you to upgrade to jQuery UI in order
to receive the best support and take advantage of recent bug fixes
and enhancements. Check out the
- upgrade guide
+ upgrade guide
to find out more about jQuery UI .
This site provides API documentation for jQuery UI .
We encourage you to upgrade to
- the latest stable version of jQuery UI
+ the latest stable version of jQuery UI
in order to receive the best support and take advantage of recent bug
fixes and enhancements. Check out the
- upgrade guides
- and changelogs
+ upgrade guides
+ and changelogs
to find out more about upgrading.
@@ -50,7 +50,7 @@
category from the sidebar.
jQuery UI
- supports jQuery .
+ supports .
@@ -67,9 +67,9 @@
$url = $version === $latestVersion ? '/' : "/$version/";
echo "jQuery UI $version API Documentation ";
} ?>
- jQuery Core API Documentation
- jQuery Mobile API Documentation
- jQuery Learning Center
+ jQuery Core API Documentation
+ jQuery Mobile API Documentation
+ jQuery Learning Center
diff --git a/themes/api.jqueryui.com/style.css b/themes/api.jqueryui.com/style.css
index 16a3bae3..af7abe92 100755
--- a/themes/api.jqueryui.com/style.css
+++ b/themes/api.jqueryui.com/style.css
@@ -4,14 +4,14 @@ Template: jquery
*/
a {
- color: #B24926;
+ color: #b24926;
}
.version-details a,
.returns a {
- color: #FAA523;
+ color: #faa523;
}
.signatures li h4 {
- background: #B24926;
+ background: #b24926;
}
diff --git a/themes/api.qunitjs.com/content-listing.php b/themes/api.qunitjs.com/content-listing.php
deleted file mode 100644
index a0ddf4ec..00000000
--- a/themes/api.qunitjs.com/content-listing.php
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/themes/api.qunitjs.com/footer.php b/themes/api.qunitjs.com/footer.php
deleted file mode 100644
index 988370b4..00000000
--- a/themes/api.qunitjs.com/footer.php
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/themes/api.qunitjs.com/i/favicon.ico b/themes/api.qunitjs.com/i/favicon.ico
deleted file mode 100644
index 84dae1f2..00000000
Binary files a/themes/api.qunitjs.com/i/favicon.ico and /dev/null differ
diff --git a/themes/api.qunitjs.com/single.php b/themes/api.qunitjs.com/single.php
deleted file mode 100644
index 328fe1fd..00000000
--- a/themes/api.qunitjs.com/single.php
+++ /dev/null
@@ -1,8 +0,0 @@
-
diff --git a/themes/brand.jquery.org/style.css b/themes/brand.jquery.org/style.css
index 74e05629..1df088b7 100644
--- a/themes/brand.jquery.org/style.css
+++ b/themes/brand.jquery.org/style.css
@@ -15,39 +15,21 @@ Template: jquery
/* Headlines */
#content h2 {
- font-size: 30px;
- line-height: 1.8;
- color: #333;
text-transform: uppercase;
- margin-bottom: 20px;
-}
-#content h3 {
- font-size: 22px;
- line-height: 1.5;
- color: #444;
}
#content h4 {
font-size: 18px;
- line-height: 1.2;
}
-#banner-secondary.large-banner h1,
+#banner-secondary.large-banner h1,
#banner-secondary.large-banner h2 {
font-size: 42px;
text-transform: uppercase;
}
-h6.h-klavika {
- font-size: 46px;
- line-height: 1.2;
- margin-bottom: 30px;
-}
-h6.h-klavika em {
- color: #333;
-}
-
-h6.h-helvetica {
- font: 400 46px/1.2 Helvetica, "Helvetica Neue", Arial, sans-serif !important;
- margin-bottom: 30px;
+#content .h-h1-size {
+ font-weight: bold;
+ line-height: 36px;
+ font-size: 36px;
}
/* Color Swatches */
@@ -57,19 +39,18 @@ h6.h-helvetica {
color: #fff;
padding: 20px;
}
-.color * {
- opacity: 0.9;
-}
-#content .color h6 {
- font: 800 14px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif !important;
- margin-bottom: 4px;
+#content .color h3 {
+ color: inherit;
}
#content .color ul {
margin: 0;
padding: 0;
}
+#content .color li::marker {
+ content: "";
+}
#content .color li {
- list-style-type: none;
+ list-style: none;
background: none;
margin: 0;
padding: 0;
@@ -78,9 +59,6 @@ h6.h-helvetica {
}
/* Misc Content */
-p {
- font: 16px/1.5 Helvetica, "Helvetica Neue", Arial, sans-serif;
-}
.figcaption {
padding-top: 20px;
padding-bottom: 20px;
@@ -89,7 +67,7 @@ p {
#banner-secondary p {
padding-left: 0;
color: #fff;
-}
+}
hr {
display: block;
clear: both;
@@ -98,21 +76,17 @@ hr {
/* Links */
a {
- color: #032A42;
+ color: #032a42;
}
/* Buttons */
-a.button, #content a.button, .button, input[type="submit"] {
+#content .button,
+#content a.button {
float: none;
display: inline-block;
}
/* Helpers */
-.db {
- display: inline-block;
- float: none !important;
- clear: both;
-}
.p-small {
padding-bottom: 20px;
}
\ No newline at end of file
diff --git a/themes/codeorigin.jquery.com/page.php b/themes/codeorigin.jquery.com/page.php
deleted file mode 100644
index 6e799caf..00000000
--- a/themes/codeorigin.jquery.com/page.php
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
- ID, "hide_title" ) ) ) : ?>
-
-
-
-
-
-
-
-
-
-
diff --git a/themes/contribute.jquery.org/cla-check.php b/themes/contribute.jquery.org/cla-check.php
deleted file mode 100644
index a3862f3c..00000000
--- a/themes/contribute.jquery.org/cla-check.php
+++ /dev/null
@@ -1,129 +0,0 @@
-
-
-repo = $repo;
- return $data;
-}
-
-// The web hook used to only log the audit result, not the full data.
-// So we normalize old data to the new format
-function normalizeData( $data ) {
-
- // Since we didn't store error info before, errors got logged as undefined,
- // which come across as null in PHP
- if ( is_null( $data ) ) {
- return (object) array(
- 'error' => 'Unknown error'
- );
- }
-
- // If we're missing the fully structured data, just move the audit result
- // to the proper location
- if ( !empty( $data->commits ) ) {
- return (object) array( 'data' => $data );
- }
-
- // We have proper data, just return it as is
- return $data;
-}
-
-function validateData( $data ) {
- if ( is_null( $data ) ) {
- global $wp_query;
- $wp_query->set_404();
- status_header(404);
- get_template_part( 404 );
- exit();
- }
-}
-
-function getProcessedPost( $data ) {
- the_post();
- $content = get_the_content();
-
- if ( !empty( $data->error ) ) {
- $content = preg_replace( '/.*/s', '', $content );
- $content = preg_replace( '/.*/s', '', $content );
- $content = preg_replace(
- '//',
- '' . htmlspecialchars( $data->error ) . ' ',
- $content
- );
-
- return $content;
- }
-
- if ( count( $data->data->neglectedAuthors ) ) {
- $content = preg_replace( '/.*/s', '', $content );
- $content = preg_replace( '//', neglectedAuthors( $data ), $content );
- } else {
- $content = preg_replace( '/.*/s', '', $content );
- }
-
- $content = preg_replace( '/.*/s', '', $content );
- $content = preg_replace( '//', commitLog( $data ), $content );
-
- return $content;
-}
-
-function neglectedAuthors( $data ) {
- $html = "\n";
- foreach ( $data->data->neglectedAuthors as $author ) {
- $html .= "" . htmlspecialchars( "$author->name <$author->email>" ) . " \n";
- }
- $html .= " \n";
- return $html;
-}
-
-function commitLog( $data ) {
- $commitPrefix = "https://github.com/jquery/$data->repo/commit/";
-
- $html = "\n";
- foreach ( $data->data->commits as $commit ) {
- $html .= "$commit->hash \n";
- $html .= "" . htmlspecialchars( "$commit->name <$commit->email>" ) . " \n" ; - return $html - diff --git a/themes/contribute.jquery.org/functions.php b/themes/contribute.jquery.org/functions.php new file mode 100644 index 00000000..d5b39a4e - + b/themes/contribute.jquery.org/functions.php @ -0,0 +1,8 @ +>
-
-
-
-
-
-
-
-
-
-
diff --git a/themes/events.jquery.org/boston-2010/header.php b/themes/events.jquery.org/boston-2010/header.php
deleted file mode 100644
index f0b3699b..00000000
--- a/themes/events.jquery.org/boston-2010/header.php
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
- jQuery Conference: Boston 2010
-
-
-
-
-
-
-
-
-
-
-
-
-
- post_name === 'boston' ) echo 'class="active"'; ?>>Overview
- post_name === 'speakers' ) echo 'class="active"'; ?>>Speakers
- post_name === 'schedule' ) echo 'class="active"'; ?>>Schedule
- post_name === 'sponsors' ) echo 'class="active"'; ?>>Sponsors
- post_name === 'video' ) echo 'class="active"'; ?>>Videos
-
-
-
-
-
-
\ No newline at end of file
diff --git a/themes/events.jquery.org/footer.php b/themes/events.jquery.org/footer.php
deleted file mode 100644
index 43775cb8..00000000
--- a/themes/events.jquery.org/footer.php
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/themes/events.jquery.org/i/favicon.ico b/themes/events.jquery.org/i/favicon.ico
deleted file mode 100644
index acc27029..00000000
Binary files a/themes/events.jquery.org/i/favicon.ico and /dev/null differ
diff --git a/themes/events.jquery.org/index.php b/themes/events.jquery.org/index.php
deleted file mode 100644
index 2faa0f57..00000000
--- a/themes/events.jquery.org/index.php
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
-
jQuery is better with friends.
-
There are loads of events big and small.
-
-
-
-
-
-
-
- Unfortunately there are no upcoming events right now.
- Check back soon as we're constantly adding new events around the world!
-
-
-
Here are a few upcoming jQuery Foundation events:
-
-
-
- title; ?>
- location . ' | ' . $event->date; ?>
-
-
-
-
- See more »
-
-
-
-
- Photo credits: All images used by CC license or by permission.
-
-
-
-
-
-
-
-
-
-
diff --git a/themes/events.jquery.org/page-boston-2010-video.php b/themes/events.jquery.org/page-boston-2010-video.php
deleted file mode 100644
index 8cc62722..00000000
--- a/themes/events.jquery.org/page-boston-2010-video.php
+++ /dev/null
@@ -1,275 +0,0 @@
- array(
- "name" => "Paul Irish",
- "title" => "Inaugural State of HTML5",
- "slides" => "http://stateofhtml5.appspot.com/",
- ),
-
- "doug-neiner" => array(
- "name" => "Dough Neiner",
- "title" => "Contextual jQuery",
- "slides" => "http://www.slideshare.net/dcneiner/contextual-jquery",
- ),
-
- "brian-crescimanno" => array(
- "name" => "Brian Crescimanno",
- "title" => "jQuery UI and HTML5 Video Play Nice",
- "slides" => "http://www.slideshare.net/bcrescimanno/j-query-conference-2010",
- ),
-
- "john-resig" => array(
- "name" => "John Resig",
- "title" => "Keynote - jQuery Core & jQuery Mobile",
- "slides" => "http://www.slideshare.net/jeresig/jquery-keynote-fall-2010",
- "note" => "Despite equipment testing, the primary audio connection failed right before John gave the keynote this year. The audio quality of this video is severly degraded. However, without this video, we may never have known what John Resig would sound like as a robot."
- ),
-
- "todd-parker" => array(
- "name" => "Todd Parker",
- "title" => "Mobile UI",
- "slides" => "http://www.slideshare.net/ToddParker1/jquery-mobile-overview-boston",
- ),
-
- "mike-hostetler" => array(
- "name" => "Mike Hostetler",
- "title" => "jQuery('#knowledge').appendTo('#you');",
- "slides" => "http://www.slideshare.net/mikehostetler/jqueryknowledgeappendtoyou",
- ),
-
- "john-hann" => array(
- "name" => "John Hann",
- "title" => "OOCSS for JavaScript Pirates",
- "slides" => "http://www.slideshare.net/unscriptable/oocss-for-javascript-pirates-jqcon-boston",
- ),
-
- "elijah-manor" => array(
- "name" => "Elijah Manor",
- "title" => "Introduction to jQuery UI",
- "slides" => "http://elijahmanor.com/talks/jq-ui-intro.html#slide1",
- ),
-
- "mike-taylor" => array(
- "name" => "Mike Taylor",
- "title" => "Is these a bug?, or how to contribute to the jQuery project through better bug reporting.",
- "slides" => "http://www.slideshare.net/miketaylr/is-these-a-bug",
- ),
-
- "paul-elliott" => array(
- "name" => "Paul Elliott",
- "title" => "TDD your jQuery Plugins",
- "slides" => "http://www.slideshare.net/paulelliott99/tdd-your-jquery-plugins",
- ),
-
- "brian-moschel" => array(
- "name" => "Brian Moschel",
- "title" => "A Crash Course in JavaScript Application Testing with FuncUnit",
- "slides" => "http://www.slideshare.net/moschel/funcunit",
- ),
-
- "menno-van-slooten" => array(
- "name" => "Menno van Slooten",
- "title" => "Rapid testing, rapid development - Increase your development speed by reducing your feedback loops",
- "slides" => "http://www.slideshare.net/mennovanslooten/rapid-testing-rapid-development",
- ),
-
- "rebecca-murphey" => array(
- "name" => "Rebecca Murphey",
- "title" => "Beyond the DOM: Functionality-Focused Code Organization",
- "slides" => "http://www.slideshare.net/rmurphey/functionality-basedorg",
- ),
-
- "richard-worth" => array(
- "name" => "Richard Worth",
- "title" => "Keynote - jQuery UI",
- ),
-
- "alex-sexton" => array(
- "name" => "Alex Sexton",
- "title" => "jQuery's Best Friends",
- "slides" => "http://jquerysbestfriends.com/",
- ),
-
- "garann-means" => array(
- "name" => "Garann Means",
- "title" => "Using templates to achieve awesomer architechture",
- "slides" => "http://www.slideshare.net/garann/using-templates-to-achieve-awesomer-architecture",
- ),
-
- "boaz-sender" => array(
- "name" => "Boaz Sender",
- "title" => "Exploding the internet with jQuery and Couch DB",
- "slides" => "http://htmlten.com/slides/jqcon",
- ),
-
- "ben-vinegar" => array(
- "name" => "Ben Vinegar",
- "title" => "Building Distributed JavaScript Widgets with jQuery",
- "slides" => "http://www.slideshare.net/benvinegar/building-distributed-java-script-widgets-sat",
- ),
-
- "chad-pytel" => array(
- "name" => "Chad Pytel",
- "title" => "Mobile Web Applications with jQuery",
- "slides" => "http://www.slideshare.net/ChadPytel/mobile-web-applications-with-jquery",
- ),
-
- "karl-swedberg" => array(
- "name" => "Karl Swedberg",
- "title" => "jQuery Effects: Beyond the basics",
- "slides" => "http://pres.learningjquery.com/jqcon2010/",
- ),
-
- "chris-bannon" => array(
- "name" => "Chris Bannon",
- "title" => "Theming jQuery UI like an Aristocrat",
- "slides" => "http://www.slideshare.net/banzor/theming-j-query-ui-like-an-aristocrat",
- ),
-
- "yehuda-katz" => array(
- "name" => "Yehuda Katz",
- "title" => "Moving to jQuery",
- ),
-
- "dave-artz" => array(
- "name" => "Dave Artz",
- "title" => "jQuery in the [Aol.] Enterprise",
- "slides" => "http://www.slideshare.net/daveartz/jquery-in-the-aol-enterprise",
- ),
-
- "thomas-reynolds" => array(
- "name" => "Thomas Reynolds",
- "title" => "Organizing Code with JavaScriptMVC",
- "slides" => "http://www.slideshare.net/tdreyno/jqconf",
- ),
-
- "jonathan-sharp" => array(
- "name" => "Jonathan Sharp",
- "title" => "App in a Browser",
- "slides" => "http://www.slideshare.net/jdsharp/app-in-a-browser",
- ),
-
- "scott-gonzalez" => array(
- "name" => "Scott González",
- "title" => "Building Extensible Widgets",
- "slides" => "http://nemikor.com/presentations/Building-Extensible-Widgets.pdf",
- ),
-
- "ralph-whitbeck" => array(
- "name" => "Ralph Whitbeck",
- "title" => "Getting Involved",
- "slides" => "http://www.slideshare.net/rwhitbeck/jquery-conference-2010-getting-involved",
- ),
-
- "matt-kelly" => array(
- "name" => "Matt Kelly",
- "title" => "Super Awesome Interactions with jQuery",
- "slides" => "http://www.zurb.com/jqconf",
- ),
-
- "discussion-panel" => array(
- "name" => "Discussion Panel",
- "title" => "jQuery Team Panel Discussion",
- )
-);
-
-$speaker_slug = isset( $_GET[ 'talk' ] ) ? $_GET[ 'talk' ] : '';
-
-if ( !$speaker_slug || !isset( $speakers[ $speaker_slug ] ) ) {
- header( 'Location: /2010/boston/video/' );
- die();
-}
-
-$speaker = $speakers[ $speaker_slug ];
-
-the_post();
-include( 'boston-2010/header.php' );
-?>
-
-
-
-
-
-
-
-
- ← All Videos
-
-
- The conference videos are primarily of the presenter and the slides are not integrated into the video.
-
- As annoying as it might be, please grab the presentation here and follow along as you watch. Next time we shoot video, we'll plan to integrate the slides.
-
- No slides are currently availible for this presentation.
-
-
-
- echo $speaker['note']; ?>
-
-
-
-
-
-
-
-
-
-
-
diff --git a/themes/events.jquery.org/page-boston-2010.php b/themes/events.jquery.org/page-boston-2010.php
deleted file mode 100644
index 4d1c8a8a..00000000
--- a/themes/events.jquery.org/page-boston-2010.php
+++ /dev/null
@@ -1,11 +0,0 @@
-post_name === 'sponsors';
-
-include( 'boston-2010/header.php' );
-the_content();
-include( 'boston-2010/footer.php' );
diff --git a/themes/events.jquery.org/page-boston-2011.php b/themes/events.jquery.org/page-boston-2011.php
deleted file mode 100644
index 0c9849d7..00000000
--- a/themes/events.jquery.org/page-boston-2011.php
+++ /dev/null
@@ -1,199 +0,0 @@
-post_name !== 'boston' && $post->post_name !== 'schedule';
-?>
-
-
-
-
- jQuery Conference: Boston 2011
-
-
-
-
-
-
-
-
-
-
-
-
-
- post_name === 'boston' ) echo 'class="active"'; ?>>Home
- post_name === 'schedule' ) echo 'class="active"'; ?>>Schedule
- post_name === 'hotel' ) echo 'class="active"'; ?>>Hotel
- post_name === 'training' ) echo 'class="active"'; ?>>Training
- post_name === 'sponsors' ) echo 'class="active"'; ?>>Sponsors
- post_name === 'register' ) echo 'class="active"'; ?>>Register
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/themes/events.jquery.org/page-sf-bay-area-2010.php b/themes/events.jquery.org/page-sf-bay-area-2010.php
deleted file mode 100644
index 8386dae4..00000000
--- a/themes/events.jquery.org/page-sf-bay-area-2010.php
+++ /dev/null
@@ -1,175 +0,0 @@
-post_name === "sf-bay-area";
-?>
-
-
-
-
- jQuery Conference: San Francisco Bay Area
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/themes/events.jquery.org/page-sf-bay-area-2011.php b/themes/events.jquery.org/page-sf-bay-area-2011.php
deleted file mode 100644
index d98eb48e..00000000
--- a/themes/events.jquery.org/page-sf-bay-area-2011.php
+++ /dev/null
@@ -1,228 +0,0 @@
-post_name === 'hotels';
-?>
-
-
-
-
- jQuery Conference: San Francisco Bay Area 2011
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- post_name === 'sf-bay-area' ) echo 'class="active"'; ?>>Overview
- post_name === 'speakers' ) echo 'class="active"'; ?>>Speakers
- post_name === 'schedule' ) echo 'class="active"'; ?>>Schedule
- post_name === 'training' ) echo 'class="active"'; ?>>Training
- post_name === 'hotels' ) echo 'class="active"'; ?>>Hotels
-
-
-
-
-
-
-
-
-
- post_name === 'sf-bay-area' ) : ?>
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/themes/events.jquery.org/page-uk-2013.php b/themes/events.jquery.org/page-uk-2013.php
deleted file mode 100644
index 4a1053b9..00000000
--- a/themes/events.jquery.org/page-uk-2013.php
+++ /dev/null
@@ -1,338 +0,0 @@
-
-
-
-
- jQuery UK Conference - Oxford 2013
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- post_name === 'uk' ) echo 'class="active"'; ?>>Home
- post_name === 'schedule' ) echo 'class="active"'; ?>>Programme
- post_name === 'workshops' ) echo 'class="active"'; ?>>Workshops
- post_name === 'location' ) echo 'class="active"'; ?>>Location
- post_name === 'extras' ) echo 'class="active"'; ?>>Fringe
- Buy tickets
-
-
-
-
-
-
-
-
-
-
-
-
Thanks to our wonderful sponsors
-
-
-
- We have a range of sponsorship opportunities available, which you can find out more about in our sponsor pack.
-
- Please get in touch with John Wards, our Technical Director, by email (
- john@whiteoctober.co.uk
- ) or call him on
- +44(0)207 976 4894
- , to discuss sponsoring the event.
-
-
-
-
-
Proud to be part of Digital Oxford Week
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/themes/events.jquery.org/page-year.php b/themes/events.jquery.org/page-year.php
deleted file mode 100644
index a1afc854..00000000
--- a/themes/events.jquery.org/page-year.php
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
Events
-
-
-
-
-
location . ' | ' . $event->date; ?>
-
-
-
-
-
diff --git a/themes/events.jquery.org/page.php b/themes/events.jquery.org/page.php
deleted file mode 100644
index 77cddf01..00000000
--- a/themes/events.jquery.org/page.php
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/themes/events.jquery.org/style.css b/themes/events.jquery.org/style.css
deleted file mode 100644
index 10928f43..00000000
--- a/themes/events.jquery.org/style.css
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
-Theme Name: events-jquery-org
-Template: jquery
-*/
-
-#banner-secondary.large-banner {
- background-image: url("/resources/images/banner-events-bkg.jpg");
- background-repeat: no-repeat;
- margin: -20px 0 20px;
- padding: 85px 0;
-}
-
-#banner-secondary .banner-text {
- background-color: rgba(0, 0, 0, 0.82);
- text-align: center;
- padding-top: 3%;
- padding-bottom: 3%;
-}
-
-.row article.conference-grid.six {
- width: 49%;
- margin-right: 2%;
- margin-bottom: 2%;
- padding:3% 0;
- text-align: center;
- background-position: center center;
- background-repeat: no-repeat;
- background-size: cover;
-}
-.row article.conference-grid.six:nth-child(2n+1) {
- margin-right: 0;
-}
-
-.conference-grid section {
- background-color: rgba(0, 0, 0, 0.68);
- text-align: center;
- padding-top: 3%;
- padding-bottom: 5%;
- padding-left: 2%;
- padding-right: 2%;
-
- text-shadow: 0 1px 0 rgba(0, 0, 0, 0.51);
-}
-
-#content .conference-grid h3 {
- font-size: 28px;
- color: #fff;
- line-height: 28px;
- margin-bottom: 3px;
-}
-
-.conference-grid p {
- margin-top: 0;
- color: #b3b3b3;
- font-size: 16px;
-}
-
-.conference-grid p.sponsored {
- color: #fff;
- margin-bottom: 5px;
-}
-
-.conference-grid p.sponsored a {
- font-weight: bold;
- color: #fff;
-}
-
-.conference-grid p.sponsored a:hover {
- color: #d58e49;
-}
-
-#content .conference-grid a.button {
- margin-top: -3%;
- margin-left: auto;
- margin-right: auto;
- display: block;
- width: 150px;
- float: none;
-}
-
-#content .past-conferences h3 {
- clear: both;
-}
-
-#content a.past-conference-grid.four {
- width: 31%;
- margin-right: 2%;
- background-color: #ccc;
- margin-bottom: 3%;
- text-align: center;
- padding-top: 2%;
- padding-bottom: 2%;
- text-decoration: none;
- display: block;
-}
-
-a.past-conference-grid h4 {
- color: #444;
- font-size: 18px;
- font-weight: bold;
- margin-bottom: 7px;
- padding-left: 2%;
- padding-right: 2%;
-}
-
-a.past-conference-grid p {
- margin: 0;
- color: #444;
- padding-left: 2%;
- padding-right: 2%;
-}
-
-#content a.past-conference-grid:hover
- {
- background-color: #bcbcbc;
- }
-
diff --git a/themes/index.php b/themes/index.php
index 4e6c07c7..62200328 100755
--- a/themes/index.php
+++ b/themes/index.php
@@ -1,3 +1,2 @@
\ No newline at end of file
diff --git a/themes/irc.jquery.org/i/favicon.ico b/themes/irc.jquery.org/i/favicon.ico
deleted file mode 100644
index acc27029..00000000
Binary files a/themes/irc.jquery.org/i/favicon.ico and /dev/null differ
diff --git a/themes/irc.jquery.org/robots.txt b/themes/irc.jquery.org/robots.txt
deleted file mode 100644
index 6288b163..00000000
--- a/themes/irc.jquery.org/robots.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-User-Agent: *
-Disallow: /wp-admin/
-Disallow: /wp-includes/
-
-Disallow: /%23jquery/
-Disallow: /%23jquery-dev/
-Disallow: /%23jqueryui-dev/
-Disallow: /%23jquerymobile-dev/
-Disallow: /%23jquery-meeting/
-Disallow: /%23jquery-infrastructure/
-Disallow: /%23jquery-developer-summit/
-Disallow: /%23jquery-content/
-
-Disallow: /#jquery/
-Disallow: /#jquery-dev/
-Disallow: /#jqueryui-dev/
-Disallow: /#jquerymobile-dev/
-Disallow: /#jquery-meeting/
-Disallow: /#jquery-infrastructure/
-Disallow: /#jquery-developer-summit/
-Disallow: /#jquery-content/
diff --git a/themes/irc.jquery.org/sidebar.php b/themes/irc.jquery.org/sidebar.php
deleted file mode 100644
index c773c702..00000000
--- a/themes/irc.jquery.org/sidebar.php
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
diff --git a/themes/irc.jquery.org/style.css b/themes/irc.jquery.org/style.css
deleted file mode 100755
index 2cfc318d..00000000
--- a/themes/irc.jquery.org/style.css
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
-Theme Name: irc-jquery-org
-Template: jquery
-*/
-
-iframe {
- border: 0;
-}
-
-a {
- color: #065791;
-}
diff --git a/themes/jquery.com/i/try-jquery.jpg b/themes/jquery.com/i/try-jquery.jpg
deleted file mode 100644
index 7932b35d..00000000
Binary files a/themes/jquery.com/i/try-jquery.jpg and /dev/null differ
diff --git a/themes/jquery.com/i/try-jquery@2x.jpg b/themes/jquery.com/i/try-jquery@2x.jpg
deleted file mode 100644
index bb17277d..00000000
Binary files a/themes/jquery.com/i/try-jquery@2x.jpg and /dev/null differ
diff --git a/themes/jquery.com/page.php b/themes/jquery.com/page.php
index ff2030b8..023587ed 100644
--- a/themes/jquery.com/page.php
+++ b/themes/jquery.com/page.php
@@ -2,5 +2,3 @@
// jquery.com doesn't use sidebars, so we alias page to page-contentfull
get_template_part( 'page', 'contentfull' );
-
-?>
diff --git a/themes/jquery.com/single.php b/themes/jquery.com/single.php
new file mode 100644
index 00000000..8c6f2f0f
--- /dev/null
+++ b/themes/jquery.com/single.php
@@ -0,0 +1,2 @@
+ a {
- display:block;
+ display: block;
padding: 0 0 .5em 0;
font-size: 2em;
width: 100%;
- text-align:center;
+ text-align: center;
text-decoration: none;
line-height: 0.8em;
}
@@ -92,93 +84,136 @@ a,
font-size: 0.6em;
}
#content #banner-secondary .download-main > a span.download {
- background: url('i/download.png') 0px 0px;
+ background: url('i/download.png') 0 0;
width: 44px;
- height:37px;
+ height: 37px;
position: relative;
top: 1em;
- display:inline-block;
- margin-right:0.5em;
+ display: inline-block;
+ margin-right: 0.5em;
}
-
-.resources {
- padding-left: 60px;
+#content #banner-secondary .download-main .support-notice {
+ font-size: 12px;
}
-#content li.try-jquery {
- background: none;
- margin: 10px 0 0;
- padding: 0;
+/* New download button */
+#banner-secondary > .download {
+ display: flex;
+ flex-direction: column;
+ align-items: flex-start;
+ margin-bottom: 1em;
}
-
-#content li.try-jquery a {
- background: url('i/try-jquery.jpg') top left no-repeat;
- background-size: 100%;
- height: 126px;
- width: 277px;
- text-indent: -9999px;
- display: block;
- max-width: 100%;
+.download-button-content {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ gap: 0.5em;
}
-
-@media only screen and (-webkit-device-pixel-ratio: 2) {
- #content li.try-jquery a {
- background-image: url('i/try-jquery@2x.jpg');
- }
+.download-button-content .download-icon {
+ background: url('i/download.png') no-repeat 0 5px / 100% 100%;
+ width: 35px;
+ height: 35px;
+ display: inline-block;
+ flex-shrink: 0;
}
-
-#content #corporate-members li {
- background: none;
- height: 150px;
+.download-button-content .download-message {
+ flex-grow: 1;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
text-align: center;
+ gap: 0.25em;
}
-
-#corporate-members span {
- display: inline-block;
- height: 100%;
- vertical-align: middle;
+.download-button-content .download-message .download-version {
+ font-size: 0.7em;
}
-
-#corporate-members a {
- height: 100%;
+.download-options .support-notice {
+ margin: 0.5em 0;
+ color: #ccc;
}
-
-#corporate-members img {
- vertical-align: middle;
- max-height: 150px;
+@media only screen and (max-width: 767px) {
+ #banner-secondary .download {
+ align-items: center;
+ }
}
-/* Project Tiles */
+/* Team */
-#content .project-tiles {
+.block-grid,
+#content .block-grid {
+ display: flex;
+ flex-flow: row wrap;
+ margin: 0 -12px;
+}
+.block-grid li,
+#content .block-grid li {
+ display: block;
margin: 0;
+ padding: 0 12px 12px;
+}
+.block-grid.two-up li,
+#content .block-grid.two-up li {
+ width: 50%;
+}
+.block-grid.three-up li,
+#content .block-grid.three-up li {
+ width: 33.33%;
+}
+.block-grid.four-up li,
+#content .block-grid.four-up li {
+ width: 25%;
+}
+.block-grid.five-up li,
+#content .block-grid.five-up li {
+ width: 20%;
+}
+@media only screen and (max-width: 767px) {
+ .block-grid.mobile-one-up li { width: 100% !important; }
+ .block-grid.mobile-two-up li { width: 50% !important; }
+ .block-grid.mobile-three-up li { width: 33.33% !important; }
+ .block-grid.mobile-four-up li { width: 25% !important; }
}
-.project-tile {
- padding-top: 1em;
- padding-bottom: 1em;
+.page-slug-team .block-grid li {
text-align: center;
}
-.project-tile a {
- text-indent: -9999px;
- display: inline-block;
+.page-slug-team .block-grid img {
+ max-width: 100%;
+ margin-bottom: 10px;
}
-
-/* Browser Support */
-
-#support-matrix {
- width: 100%;
- margin: 0 auto 1em;
+.page-slug-team .block-grid p {
+ text-align: left;
+}
+.page-slug-team #content h2 {
+ color: #333;
+ font-size: 20px;
+ line-height: 20px;
+ font-weight: bold;
+ text-align: center;
+ margin-bottom: 5px;
+}
+.page-slug-team #content h3 {
+ color: #0769ad;
+ font-style: italic;
+ font-size: 14px;
+ line-height: 18px;
+ text-align: center;
}
-#support-matrix tbody tr {
- border-bottom: none;
+.page-slug-team #content .team-list h3 {
+ min-height: 5px;
}
-#support-matrix tbody tr:hover {
- background-color: transparent;
+.page-slug-team #content .past-team-list h2,
+.page-slug-team #content .past-team-list h3 {
+ text-align: left;
+}
+.page-slug-team #content .past-team-list h3 {
+ min-height: 45px;
+ border-bottom: 1px solid #dbdbdb;
}
-#support-matrix td {
- text-align: center;
+.page-slug-team .center-txt {
+ padding-left: 10%;
+ padding-right: 10%;
}
diff --git a/themes/jquery.org/images/dark-grey-tile.png b/themes/jquery.org/images/dark-grey-tile.png
deleted file mode 100644
index f1c1ad3d..00000000
Binary files a/themes/jquery.org/images/dark-grey-tile.png and /dev/null differ
diff --git a/themes/jquery.org/images/gauze.png b/themes/jquery.org/images/gauze.png
deleted file mode 100644
index 4cef603f..00000000
Binary files a/themes/jquery.org/images/gauze.png and /dev/null differ
diff --git a/themes/jquery.org/style.css b/themes/jquery.org/style.css
index 77d6cbdf..1b222808 100755
--- a/themes/jquery.org/style.css
+++ b/themes/jquery.org/style.css
@@ -5,26 +5,9 @@ Template: jquery
/*Custom Colors*/
a, #sidebar h3 {
- color: #0769AD;
-}
-/*
-#content code a {
- background-color: rgba(6, 89, 150, 0.19);
-}
-
-#content h1 {
- color: white;
- font-weight: normal;
- font-style: normal;
+ color: #0769ad;
}
-#content h2 {
- color: white;
- font-weight: normal;
- font-style: normal;
- margin-bottom: 20px;
-}*/
-
.page-slug-index #banner-secondary.large-banner {
padding-top: 20px;
padding-bottom: 20px;
@@ -42,7 +25,7 @@ a, #sidebar h3 {
}
#content h2 {
- color: #0769AD;
+ color: #0769ad;
font-weight: normal;
font-style: normal;
margin-bottom: 20px;
@@ -63,28 +46,12 @@ a, #sidebar h3 {
font-size: 60px;
}
-.jquery-foundation.home #banner-secondary.large-banner.entry-header {
- padding-bottom: 0px;
-}
-
-.jquery-foundation.page-slug-join #content #banner-large-image .vertically-centered-black-bg {
- margin-top: 14.5%;
-}
-
/*Homepage*/
.large-banner img {
margin-bottom: 20px;
}
-.sub-banner {
- background-color: lightgray;
- text-align: center;
- margin: -25px -25px 0;
- color: rgb(102,102,102);
- font: bold 20px/40px "klavika-web", "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
-}
-
#content > div.row {
margin-top: 30px;
}
@@ -98,343 +65,29 @@ a, #sidebar h3 {
position: relative;
}
-.flexslider {
- width: 100%;
- display: block;
- border: 1px solid #cbcbcb;
- margin-left: 0px;
- height:a;
- overflow: hidden;
- border-radius: 10px;
- list-style: none;
- padding-top: 10px;
-}
-
#content .slides {
- margin-left: 0px;
-}
-
-.flexslider ol {
- display: none;
-}
-
-#content .flexslider li {
- padding-left: 0px;
- background: none;
- display: none;
+ margin-left: 0;
}
ul.flex-direction-nav {
display: none;
}
-#content .flexslider li {
- text-align: center;
-}
-
-#content .flexslider li img {
- margin-top: 10px;
- display: inline-block;
-}
-
-#content .flexslider li img.last {
- margin-right: 0px;
-}
-
-.dark-callout-box {
- background-image: url(../jquery/images/dark-grey-tile.png);
- margin-bottom: 30px;
- border-bottom: 10px solid #c1c1c1;
- border-top: 10px solid #c1c1c1;
- text-align: center;
- padding-top: 35px;
- padding-bottom: 35px;
- margin-top: 25px;
-}
-
- .jquery-foundation.page-slug-donate #content .dark-callout-box {
- padding-top: 0px;
- padding-bottom: 0px;
- }
-
-.big-message {
- font: bold 50px/50px "klavika-web", "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
- color: #ffffff !important;
- margin-top: 20px;
-}
-
-#content .dark-callout-box h3 {
- font: bold 30px/50px "klavika-web", "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
- color: #fff;
-}
-
-#content .dark-callout-box p {
- font: bold 30px/50px "klavika-web", "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
- color: #dddcdc;
-}
-
-#content .project h4 {
- font: bold 24px/50px "klavika-web", "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
- margin-bottom: 0;
- color: #464646;
-}
-
-#content .project {
- margin-top: 35px;
-}
-
- #content .twelve.columns .project {
- margin-top: 0px;
- }
-
-.project img {
- float: left;
- display: inline;
- width: 10%;
-}
-
-.project-text {
- float: right;
- width: 85.5%;
-}
-
-.member-level {
- margin-bottom: 20px;
- background-color: #222;
- position: relative;
- overflow: hidden;
-}
-
-.member-level.last {
- margin-right: 0px;
-}
-
-.member-level-icon {
- display: block;
- position: absolute;
- top: 60px;
- right: -50px;
- width: 225px;
- height: 225px;
- opacity: 0.2;
- z-index: 1;
-}
-
-.member-level button.button.join {
- position: relative;
- top: 0px;
- left: 15px;
- margin-bottom: 15px;
-}
-
-.member-level-icon.fan {
- background: url(images/icn-fan.png) center top no-repeat;
-}
-
-.member-level-icon.friend {
- background: url(images/icn-friend.png) center top no-repeat;
-}
-
-.member-level-icon.hero {
- background: url(images/icn-hero.png) center top no-repeat;
-}
-
-.corporate-level {
- margin-bottom: 20px;
- position: relative;
- padding: 15px;
- color: #f3f3f3;
-}
-
-.corporate-level .corporate-header {
- min-height: 75px;
-}
-
-.corporate-level .corporate-header img {
- position: absolute;
- left: 50%;
- margin-left: -150px;
-}
-
-#content .member-level h3 {
- background-color: rgba(0, 0, 0, 0.66);
- color: #ffffff;
- text-align: center;
- font-size: 30px;
- line-height: 48px;
- font-weight: bold;
-}
-
-.member-level .corporate-level p {
- float: none;
-}
-
-.member-level .corporate-level p strong {
- color: #f3f3f3;
-}
-
-#content .member-level .corporate-level ul {
- margin-bottom: 10px;
-}
-
.errors li {
color: #a00;
}
-a.icon-search {
- width: 100px;
- height: 100px;
- display: block;
- position: relative;
- text-decoration: none !important;
- float: left;
- display: inline;
- margin-left: 15px;
- margin-bottom: 10px;
- z-index: 2;
-}
-
-a.icon-search::before {
- position: absolute;
- right: 4px;
- color: #333333;
-}
-
-.member-level ul.gifts {
- float: left;
- list-style: none;
- position: relative;
- z-index: 2;
-}
-
-#content .member-level ul.gifts li,
-#content .member-level ul.gifts li strong {
- padding-left: 0;
- padding-right: 15px;
- background: none;
- color: #f3f3f3;
- font: bold "klavika-web", "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;;
-}
-
-.member-level p {
- color: #f3f3f3;
- font: bold "klavika-web", "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
- float: left;
- display: inline;
- padding-left: 15px;
- padding-right: 15px;
-}
-
-.member-level .choose-gifts button.button.pay {
- float: left;
- display: inline-block;
- position: relative;
- z-index: 2;
- margin: 0 5% 30px 0;
- width: 44%;
- max-width: 135px;
-}
-
-.member-level form .button {
- clear: none;
-}
-
-.choose-gifts {
- background-color: lightgray;
- clear: both;
- position: relative;
- z-index: 2;
- padding-left: 15px;
- padding-right: 15px;
- padding-top: 15px;
- padding-bottom: 45px;
-}
-
-.choose-gifts h4 {
- font: bold 18px/20px "klavika-web", "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
- margin-bottom: 10px;
-}
-
-.choose-gifts label {
- color: #ffffff;
- margin-right: 20px;
-}
-
-.choose-gifts hr {
- height: 1px;
- margin-top: 15px;
- margin-bottom: 15px;
- background: #898989;
-}
-
-.choose-gifts select {
- display: block;
- width: 100%;
- margin-bottom: 15px;
-}
-
-#content .choose-gifts textarea {
- width: 100%;
- min-width: 200px;
- background: white;
- border: 1px solid rgba(192,192,192,1);
-}
-
-.choose-gifts input[type="name"] {
- margin-right: 3px;
-}
-
-.choose-gifts input[type="name"], .choose-gifts input[type="email"]{
- display: inline;
- width: 49%;
- padding: 8px 12px;
- border: 1px solid rgba(192,192,192,1);
- border-radius: 2px;
- box-shadow: inset 0 1px 3px rgba(0,0,0,0.17);
-}
-
-#content .choose-gifts input:focus, #content .choose-gifts input[type=text]:focus, #content .choose-gifts textarea:focus {
- border: 1px solid #78CFF5;
- box-shadow: none;
-}
-
-#content .choose-gifts input::-webkit-input-placeholder {
- color: rgba(51,51,51,0.75);
-}
-#content .choose-gifts input:-moz-placeholder {
- color: rgba(51,51,51,0.75);
-}
-#content .choose-gifts input::-moz-placeholder {
- color: rgba(51,51,51,0.75);
-}
-#content .choose-gifts input:-ms-input-placeholder {
- color: rgba(51,51,51,0.75);
-}
-
-#content .choose-gifts textarea::-webkit-input-placeholder {
- color: rgba(51,51,51,0.75);
-}
-#content .choose-gifts textarea:-moz-placeholder {
- color: rgba(51,51,51,0.75);
-}
-#content .choose-gifts textarea::-moz-placeholder {
- color: rgba(51,51,51,0.75);
-}
-#content .choose-gifts textarea:-ms-input-placeholder {
- color: rgba(51,51,51,0.75);
-}
-
/*History Page*/
.page-slug-history #content h2 {
- color: #0769AD;
+ color: #0769ad;
font-size: 40px;
line-height: 40px;
}
.page-slug-history #content h3 {
- color: #0769AD;
+ color: #0769ad;
font-weight: normal;
font-style: normal;
border-top: 1px solid #d7d7d7;
@@ -442,148 +95,15 @@ a.icon-search::before {
font-size: 24px;
line-height: 24px;
}
-
-.page-slug-team #content ul.block-grid li {
- text-align: center;
-}
-
-.page-slug-team #content ul.block-grid img {
- max-width: 100%;
- margin-bottom: 10px;
-}
-
-.page-slug-team #content ul.block-grid p {
- text-align: left;
-}
-
-.page-slug-team #content h2 {
- color: #333;
- font-size: 20px;
- line-height: 20px;
- font-weight: bold;
- text-align: center;
- margin-bottom:5px;
-}
-
-.page-slug-team #content h3 {
- color: #0769AD;
- font-style: italic;
- font-size: 14px;
- line-height: 18px;
- text-align: center;
- min-height: 45px;
- border-bottom: 1px solid #dbdbdb;
-}
-
-.page-slug-team #content ul.team-list h3 {
- border: none;
- min-height: 5px;
-}
-
-.page-slug-team #content ul.past-team-list h2,
-.page-slug-team #content ul.past-team-list h3 {
- text-align: left;
-
-}
-
-.page-slug-team #content p.center-txt {
- padding-left: 10%;
- padding-right: 10%;
-}
-
-.page-slug-members #content h2.block {
- text-align: center;
-}
-
-.page-slug-members #content a {
- color: #d58349;
-}
-
-.page-slug-members #content ul.block-grid li {
- text-align: center;
-}
-
-.page-slug-members #content ul.block-grid h3 {
- color: #4d4d4d;
- font-weight: bold;
- font-size: 18px;
- line-height: 18px;
- margin-bottom: 0;
- padding-top: 10px;
- text-align: center;
-}
-
-.page-slug-members #content ul.block-grid p {
- margin-bottom: 0;
-}
-
-.page-slug-members #content ul.block-grid p a {
- text-decoration: none;
-}
-
-.page-slug-members .corporatemembers .row {
- margin-top: 2em;
- padding-bottom: 2em;
-}
-
-.page-slug-sponsors .sponsors img {
- margin: 0.3em 1em 2em;
-}
-
-.page-slug-sponsors .sponsors .row {
- margin: 1em 0 2em;
-}
-
.page-slug-faq #content h2 {
margin-top: 1em;
margin-bottom: 0.3em;
}
-.page-slug-donate h2 {
- text-align: center;
-}
-
-.page-slug-donate form {
- padding: 0 4em;
-}
-
-.page-slug-donate select {
- vertical-align: top;
- margin: 1em;
-}
-
-.page-slug-donate .envelope {
- border: 1px solid silver;
- border-radius: 3px;
- padding: 4em;
- margin-bottom: 0.8em;
-}
-
-.page-slug-donate .envelope .vcard {
- margin-top: 1em;
- margin-left: 30%;
-}
-
-.page-slug-donate #content .row .callout-block {
- padding-top: 20px;
- padding-bottom: 20px;
- margin-bottom: 40px;
-}
-
-/*a.button,
-#content a.button, .button {
- background-color: #b71551;
-}
-
-a.button:hover,
-#content a.button:hover {
- background-color: #7c0d36;
-}*/
-
/*Adjust widths for longer navigation*/
-nav#main .searchform {
+.searchform {
width: 20%;
}
@@ -595,35 +115,10 @@ nav#main ul {
padding-bottom: 15px;
}
-@media only screen and (max-width: 767px) {
- .sponsors-page ul.block-grid li img {
- float: none;
- width: 80%;
- max-width: 80%;
- display: block;
- margin-left: auto;
- margin-right: auto;
- margin-bottom: 20px;
- margin-top: 0;
- }
-
- .sponsors-page ul.block-grid li p {
- float: none;
- width: 100%;
- text-align: center;
- }
-
- nav#main .searchform,
- nav#main ul {
- width: 100%;
- }
-}
-
/*iPad Portrait*/
-@media only screen and (max-width: 768px) {
-
+@media only screen and (max-width: 767px) {
#banner-large-image {
margin-right: -40px;
margin-left: -40px;
@@ -635,7 +130,7 @@ nav#main ul {
position: relative;
}
- #banner-large-image .vertically-centered-black-bg{
+ #banner-large-image .vertically-centered-black-bg {
height: 70% !important;
margin-top: 14%;
padding-top: 6%;
@@ -654,31 +149,11 @@ nav#main ul {
line-height: 1.4em;
padding-bottom: 60px;
}
-
- .member-level {
- width: 100%;
- margin-bottom: 30px;
- }
-
- .sub-banner {
- background-color: #d6eef1;
- text-align: center;
- height: auto;
- color: #007d88;
- font: 20px/26px "klavika-web";
- margin: -30px -40px 0;
- padding: 2% 10% 0.5%;
- }
-
- .flexslider {
- margin-bottom: 20px;
- }
}
/*iPhone Landscape*/
@media only screen and (max-width: 480px) {
-
#banner-large-image {
margin-right: -25px;
margin-left: -25px;
@@ -690,7 +165,7 @@ nav#main ul {
position: relative;
}
- #banner-large-image .vertically-centered-black-bg{
+ #banner-large-image .vertically-centered-black-bg {
height: 70% !important;
margin-top: 14%;
padding-top: 7%;
@@ -709,47 +184,4 @@ nav#main ul {
line-height: 1.1em;
padding-bottom: 60px;
}
-
- .member-level {
- width: 100%;
- margin-bottom: 30px;
- }
-
- .sub-banner {
- margin-left: -25px;
- margin-right: -25px;
- padding-top: 3.5%;
- }
-
- .dark-callout-box {
- background-image: url(images/dark-grey-tile.png);
- border-bottom: 10px solid #c1c1c1;
- border-top: 10px solid #c1c1c1;
- text-align: center;
- margin-bottom: 0;
- padding-right: 22px !important;
- padding-left: 22px !important;
- }
-
- #content .dark-callout-box h3 {
- font: bold 28px/32px "klavika-web", "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
- color: #fff;
- }
-
- #content .dark-callout-box p {
- color: #dddcdc;
- font-size: 14px;
- line-height: 18px;
- }
-
- .big-message {
- font: bold 30px/30px "klavika-web", "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif !important;
- color: #ffffff !important;
- margin-top: 20px;
- }
-
- .callout-block {
- padding-right: 20px !important;
- padding-left: 20px !important;
- }
}
diff --git a/themes/jquery/archive.php b/themes/jquery/archive.php
index 60ccc42b..1a3fd962 100755
--- a/themes/jquery/archive.php
+++ b/themes/jquery/archive.php
@@ -16,7 +16,7 @@
-
+
+
-
+
diff --git a/themes/jquery/comments.php b/themes/jquery/comments.php
index 5582afe5..dd54ec46 100755
--- a/themes/jquery/comments.php
+++ b/themes/jquery/comments.php
@@ -1,4 +1,12 @@
+
+
\ No newline at end of file
diff --git a/themes/jquery/content-single.php b/themes/jquery/content-single.php
index c500474c..dd5bd251 100755
--- a/themes/jquery/content-single.php
+++ b/themes/jquery/content-single.php
@@ -8,7 +8,7 @@
@@ -48,7 +48,7 @@
-
+
diff --git a/themes/jquery/content.php b/themes/jquery/content.php
index 0d9a490c..a7e72596 100755
--- a/themes/jquery/content.php
+++ b/themes/jquery/content.php
@@ -26,13 +26,16 @@
-
-
+
+
-
+
diff --git a/themes/jquery/content/books/qunit-instant-testing.jpg b/themes/jquery/content/books/qunit-instant-testing.jpg
deleted file mode 100644
index 0071a3f4..00000000
Binary files a/themes/jquery/content/books/qunit-instant-testing.jpg and /dev/null differ
diff --git a/themes/jquery/content/books/qunit-tddjs.png b/themes/jquery/content/books/qunit-tddjs.png
deleted file mode 100644
index b2f4100b..00000000
Binary files a/themes/jquery/content/books/qunit-tddjs.png and /dev/null differ
diff --git a/themes/jquery/content/books/qunit-testable-javascript.gif b/themes/jquery/content/books/qunit-testable-javascript.gif
deleted file mode 100644
index a5ddcd6a..00000000
Binary files a/themes/jquery/content/books/qunit-testable-javascript.gif and /dev/null differ
diff --git a/themes/jquery/content/donate.png b/themes/jquery/content/donate.png
new file mode 100644
index 00000000..bd6ed614
Binary files /dev/null and b/themes/jquery/content/donate.png differ
diff --git a/themes/jquery/css/base.css b/themes/jquery/css/base.css
index 82a0b7e6..08792414 100644
--- a/themes/jquery/css/base.css
+++ b/themes/jquery/css/base.css
@@ -1,7 +1,7 @@
/*! Copyright jQuery Foundation and other contributors
* Includes:
- * - normalize.css v1.0.1 | MIT License | git.io/normalize
- * - Font Awesome - http://fortawesome.github.com/Font-Awesome - CC BY 3.0
+ * - normalize.css v1.0.1 (MIT License, Copyright Nicolas Gallagher and Jonathan Neal)
+ * - Font Awesome v3.0.2 (MIT License, Font Awesome by Dave Gandy)
*/
/* ==========================================================================
@@ -9,15 +9,12 @@
========================================================================== */
* {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
box-sizing: border-box;
}
/*
* Corrects `block` display not defined in IE 6/7/8/9 and Firefox 3.
*/
-
article,
aside,
details,
@@ -33,22 +30,18 @@ summary {
}
/*
- * Corrects `inline-block` display not defined in IE 6/7/8/9 and Firefox 3.
+ * Corrects `inline-block` display.
*/
-
audio,
canvas,
video {
display: inline-block;
- *display: inline;
- *zoom: 1;
}
/*
* Prevents modern browsers from displaying `audio` without controls.
* Remove excess height in iOS 5 devices.
*/
-
audio:not([controls]) {
display: none;
height: 0;
@@ -64,18 +57,15 @@ audio:not([controls]) {
* 2. Prevents iOS text size adjust after orientation change, without disabling
* user zoom.
*/
-
html {
font-size: 100%; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
- -ms-text-size-adjust: 100%; /* 2 */
}
/*
* Addresses `font-family` inconsistency between `textarea` and other form
* elements.
*/
-
html,
button,
input,
@@ -85,40 +75,42 @@ textarea {
color: #333;
}
-/*
- * Addresses margins handled incorrectly in IE 6/7.
- */
-
body {
margin: 0;
}
-::-moz-selection {
- background: #b3d4fc;
- text-shadow: none;
-}
-
::selection {
- background: #b3d4fc;
+ background: #b4efff;
text-shadow: none;
}
-
-.chromeframe {
- margin: 0.2em 0;
- background: #ccc;
- color: #000;
- padding: 0.2em 0;
+.jquery-ui ::selection {
+ background: #ffddb2;
+}
+.jquery-mobile ::selection {
+ background: #c9f2c8;
}
+/* ==========================================================================
+ FontAwesome (https://fontawesome.com/v3/)
+ .ttf and .woff files were included in the FontAwesome download.
+ .woff2 file created with https://github.com/nfroidure/ttf2woff2
+ ========================================================================== */
+
@font-face {
- font-family: 'FontAwesome';
- src: url('fonts/fontawesome-webfont.eot?v=3.0.2');
- src: url('fonts/fontawesome-webfont.eot?#iefix&v=3.0.2') format('embedded-opentype'),
- url('fonts/fontawesome-webfont.woff?v=3.0.2') format('woff'),
- url('fonts/fontawesome-webfont.ttf?v=3.0.2') format('truetype');
+ font-family: "FontAwesome";
+ src: url("../lib/FontAwesome/fontawesome-webfont.woff2") format("woff2"),
+ url("../lib/FontAwesome/fontawesome-webfont.woff") format("woff");
font-weight: normal;
font-style: normal;
}
+[class^="icon-"]:before,
+[class*=" icon-"]:before {
+ font-size: 1.2em;
+ text-decoration: inherit;
+ display: inline-block;
+ speak: none;
+}
+.icon-info-sign:before { content: "\f05a"; }
/* ==========================================================================
Links
@@ -127,7 +119,6 @@ body {
/*
* Addresses `outline` inconsistency between Chrome and other browsers.
*/
-
a:focus {
outline: thin dotted;
}
@@ -135,7 +126,6 @@ a:focus {
/*
* Improves readability when focused and also mouse hovered in all browsers.
*/
-
a:active,
a:hover {
outline: 0;
@@ -183,12 +173,11 @@ h6 {
h1, h2, h3, h4, h5, h6 {
font-weight: 700;
- font-family: "klavika-web", "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif !important;
+ font-family: Cairo, "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif !important;
}
/*
* Addresses styling not present in IE 7/8/9, Safari 5, and Chrome.
*/
-
abbr[title] {
border-bottom: 1px dotted;
}
@@ -196,7 +185,6 @@ abbr[title] {
/*
* Addresses style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome.
*/
-
b,
strong {
font-weight: bold;
@@ -209,24 +197,13 @@ blockquote {
/*
* Addresses styling not present in Safari 5 and Chrome.
*/
-
dfn {
font-style: italic;
}
-/*
- * Addresses styling not present in IE 6/7/8/9.
- */
-
-mark {
- background: #ff0;
- color: #000;
-}
-
/*
* Addresses margins set differently in IE 6/7.
*/
-
p,
pre {
margin: 1em 0;
@@ -235,7 +212,6 @@ pre {
/*
* Improves readability of pre-formatted text in all browsers.
*/
-
pre, code {
white-space: pre;
white-space: pre-wrap;
@@ -246,40 +222,34 @@ pre, code {
}
code {
padding: 0 3px;
- background-color: #eee; /* support: IE8 */;
- background-color: rgba( 0, 0, 0, .1 );
+ /* Prefer translucent shade over hardcoded light grey, so that
can be
+ also be used in elements with white text and dark backgrounds,
+ such as div.note on https://api.jqueryui.com/buttonset/
+ https://github.com/jquery/jquery-wp-content/pull/314
+ */
+ background-color: rgba( 0, 0, 0, 0.08 );
border-radius: 3px;
}
pre code {
background-color: transparent;
font-size: 16px;
- font-weight: bold;
white-space: pre;
word-wrap: normal;
}
-/*
- * Addresses CSS quotes not supported in IE 6/7.
- */
-
+/* Addresses CSS quotes not supported in IE 6/7. */
q {
quotes: none;
}
-/*
- * Addresses `quotes` property not supported in Safari 4.
- */
-
+/* Addresses `quotes` property not supported in Safari 4. */
q:before,
q:after {
content: '';
content: none;
}
-/*
- * Prevents `sub` and `sup` affecting `line-height` in all browsers.
- */
-
+/* Prevents `sub` and `sup` affecting `line-height` in all browsers. */
sub,
sup {
font-size: 75%;
@@ -287,11 +257,9 @@ sup {
position: relative;
vertical-align: baseline;
}
-
sup {
top: -0.5em;
}
-
sub {
bottom: -0.25em;
}
@@ -300,10 +268,7 @@ sub {
Lists
========================================================================== */
-/*
- * Addresses margins set differently in IE 6/7.
- */
-
+/* Addresses margins set differently in IE 6/7. */
dl,
menu,
ol,
@@ -315,20 +280,14 @@ dd {
margin: 0 0 0 40px;
}
-/*
- * Addresses paddings set differently in IE 6/7.
- */
-
+/* Addresses paddings set differently in IE 6/7. */
menu,
ol,
ul {
padding: 0;
}
-/*
- * Corrects list images handled incorrectly in IE 7.
- */
-
+/* Corrects list images handled incorrectly in IE 7. */
nav ul,
nav ol {
list-style: none;
@@ -341,12 +300,9 @@ nav ol {
/*
* 1. Removes border when inside `a` element in IE 6/7/8/9 and Firefox 3.
- * 2. Improves image quality when scaled in IE 7.
*/
-
img {
border: 0; /* 1 */
- -ms-interpolation-mode: bicubic; /* 2 */
vertical-align: middle;
max-width: 100%;
}
@@ -358,7 +314,6 @@ img {
/*
* Addresses margin not present in IE 6/7/8/9, Safari 5, and Opera 11.
*/
-
figure {
margin: 0;
}
@@ -370,7 +325,6 @@ figure {
/*
* Corrects margin displayed oddly in IE 6/7.
*/
-
form {
margin: 0;
padding: 10px 0;
@@ -379,7 +333,6 @@ form {
/*
* Define consistent border, margin, and padding.
*/
-
fieldset {
border: 0;
margin: 0;
@@ -389,14 +342,11 @@ fieldset {
/*
* 1. Corrects color not being inherited in IE 6/7/8/9.
* 2. Corrects text not wrapping in Firefox 3.
- * 3. Corrects alignment displayed oddly in IE 6/7.
*/
-
legend {
border: 0; /* 1 */
padding: 0;
white-space: normal; /* 2 */
- *margin-left: -7px; /* 3 */
}
/*
@@ -405,7 +355,6 @@ legend {
* and Chrome.
* 3. Improves appearance and consistency in all browsers.
*/
-
button,
input,
select,
@@ -413,14 +362,12 @@ textarea {
font-size: 100%; /* 1 */
margin: 0; /* 2 */
vertical-align: baseline; /* 3 */
- *vertical-align: middle; /* 3 */
}
/*
* Addresses Firefox 3+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
*/
-
button,
input {
line-height: normal;
@@ -432,23 +379,18 @@ input {
* 2. Corrects inability to style clickable `input` types in iOS.
* 3. Improves usability and consistency of cursor style between image-type
* `input` and others.
- * 4. Removes inner spacing in IE 7 without affecting normal text inputs.
- * Known issue: inner spacing remains in IE 6.
*/
-
button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
- *overflow: visible; /* 4 */
}
/*
* Re-set default cursor for disabled elements.
*/
-
button[disabled],
input[disabled] {
cursor: default;
@@ -457,24 +399,17 @@ input[disabled] {
/*
* 1. Addresses box sizing set to content-box in IE 8/9.
* 2. Removes excess padding in IE 8/9.
- * 3. Removes excess padding in IE 7.
- * Known issue: excess padding remains in IE 6.
*/
-
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
- *height: 13px; /* 3 */
- *width: 13px; /* 3 */
}
/*
* 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome.
- * 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome
- * (include `-moz` to future-proof).
+ * 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome.
*/
-
input[type="search"] {
-webkit-appearance: textfield;
box-sizing: content-box;
@@ -484,7 +419,6 @@ input[type="search"] {
* Removes inner padding and search cancel button in Safari 5 and Chrome
* on OS X.
*/
-
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
@@ -493,7 +427,6 @@ input[type="search"]::-webkit-search-decoration {
/*
* Removes inner padding and border in Firefox 3+.
*/
-
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
@@ -504,7 +437,6 @@ input::-moz-focus-inner {
* 1. Removes default vertical scrollbar in IE 6/7/8/9.
* 2. Improves readability and alignment in all browsers.
*/
-
textarea {
overflow: auto; /* 1 */
vertical-align: top; /* 2 */
@@ -527,43 +459,18 @@ textarea {
border: 1px solid rgba(192,192,192,0.49);
border-radius: 2px;
-
- box-shadow: inset 0 1px 3px rgba(0,0,0,0.17);
}
-/*
- * 1. :-moz-placeholder has been deprecated in favor of ::-moz-placeholder.
- * 2. Using :placeholder for completeness.
- */
-::-webkit-input-placeholder {
- color: #9A1B1E;
-}
-:-moz-placeholder { /* 1 */
- color: #9A1B1E;
-}
-::-moz-placeholder {
- color: #9A1B1E;
-}
-:-ms-placeholder {
- color: #9A1B1E;
-}
-:placeholder { /* 2 */
- color: #9A1B1E;
-}
-
-#content input:focus,
+#content input:not([type]):focus,
#content input[type="text"]:focus,
#content input[type="email"]:focus,
#content textarea:focus {
outline: none;
color: #333;
- background: #FFF;
-
- border: 1px solid #B24926;
+ background: #fff;
- box-shadow: 0px 0px 6px rgba(23,138,156,0.5),
- inset 0px 1px 3px rgba(0,0,0,0.2);
+ border: 1px solid #b24926;
}
/**
@@ -580,11 +487,14 @@ textarea {
float: left;
}
+#content .radio ul li::marker {
+ content: "";
+}
#content .radio ul li {
+ list-style: none;
+ background: none;
margin: 0;
padding: 0;
- background: none;
- list-style-type: none;
}
.radio label {
@@ -607,7 +517,7 @@ input[type="checkbox"] {
* Submit Buttons
*/
-form input[type="submit"] {
+.top-labels input[type="submit"] {
margin: 40px 0;
float: none;
}
@@ -625,44 +535,21 @@ form input[type="submit"] {
}
/**
- * Left aligned labels
+ * Label descriptions
*/
-.left-labels label {
- padding: 5px 0 0 0;
- display: block;
-}
-
-.left-labels span {
- margin: 0 10px 0 0;
- min-width: 100px;
-
- float: left;
-
- text-align: left;
-}
-
-.left-labels .radio span {
- padding-top: 5px;
-}
-
-.left-labels .radio {
- display: block;
-}
-
-.left-labels .radio li label {
- margin: 0;
- padding: 0 0 5px 0;
-
- border: 0;
+label .field-description {
+ font-size: 0.8em;
}
/**
- * Label descriptions
+ * Button
*/
-label .field-description {
- font-size: 0.8em;
+.db {
+ display: inline-block;
+ float: none !important;
+ clear: both;
}
/* ==========================================================================
@@ -691,7 +578,7 @@ table {
}
#content th {
- font-family: "klavika-web", "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
+ font-family: Cairo, "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
}
#content th,
@@ -699,6 +586,27 @@ table {
padding: .5em;
}
+/* ==========================================================================
+ Cairo Font (https://github.com/Gue3bara/Cairo)
+ .ttf files downloaded from Google Fonts, but only used for conversion.
+ .woff files created with https://github.com/odemiral/woff2sfnt-sfnt2woff
+ .woff2 files created with https://github.com/nfroidure/ttf2woff2
+ ========================================================================== */
+
+@font-face {
+ font-family: Cairo;
+ src: url("../lib/Cairo/Cairo-Regular.woff2") format("woff2"),
+ url("../lib/Cairo/Cairo-Regular.woff") format("woff");
+ font-weight: normal;
+}
+
+@font-face {
+ font-family: Cairo;
+ src: url("../lib/Cairo/Cairo-Bold.woff2") format("woff2"),
+ url("../lib/Cairo/Cairo-Bold.woff") format("woff");
+ font-weight: 700;
+}
+
/* ==========================================================================
Font Awesome
========================================================================== */
@@ -717,13 +625,12 @@ table {
line-height: normal;
vertical-align: baseline;
background-image: none;
- background-position: 0% 0%;
+ background-position: 0 0;
background-repeat: repeat;
margin-top: 0;
}
/* more sprites.less reset*/
-.icon-white,
.nav-pills > .active > a > [class^="icon-"],
.nav-pills > .active > a > [class*=" icon-"],
.nav-list > .active > a > [class^="icon-"],
@@ -760,7 +667,6 @@ a [class*=" icon-"] {
.nav [class*=" icon-"] {
display: inline;
/* keeps button heights with and without icons the same */
-
}
.btn [class^="icon-"].icon-large,
.nav [class^="icon-"].icon-large,
@@ -768,19 +674,6 @@ a [class*=" icon-"] {
.nav [class*=" icon-"].icon-large {
line-height: .9em;
}
-.btn [class^="icon-"].icon-spin,
-.nav [class^="icon-"].icon-spin,
-.btn [class*=" icon-"].icon-spin,
-.nav [class*=" icon-"].icon-spin {
- display: inline-block;
-}
-.nav-tabs [class^="icon-"],
-.nav-pills [class^="icon-"],
-.nav-tabs [class*=" icon-"],
-.nav-pills [class*=" icon-"] {
- /* keeps button heights with and without icons the same */
-
-}
.nav-tabs [class^="icon-"],
.nav-pills [class^="icon-"],
.nav-tabs [class*=" icon-"],
@@ -804,46 +697,16 @@ li [class^="icon-"].icon-large,
li [class*=" icon-"].icon-large,
.nav li [class*=" icon-"].icon-large {
/* increased font size for icon-large */
-
width: 1.5625em;
}
ul.icons {
- list-style-type: none;
+ list-style: none;
text-indent: -0.75em;
}
ul.icons li [class^="icon-"],
ul.icons li [class*=" icon-"] {
width: .75em;
}
-.icon-muted {
- color: #eeeeee;
-}
-.icon-border {
- border: solid 1px #eeeeee;
- padding: .2em .25em .15em;
- border-radius: 3px;
-}
-.icon-2x {
- font-size: 2em;
-}
-.icon-2x.icon-border {
- border-width: 2px;
- border-radius: 4px;
-}
-.icon-3x {
- font-size: 3em;
-}
-.icon-3x.icon-border {
- border-width: 3px;
- border-radius: 5px;
-}
-.icon-4x {
- font-size: 4em;
-}
-.icon-4x.icon-border {
- border-width: 4px;
- border-radius: 6px;
-}
.pull-right {
float: right;
}
@@ -858,338 +721,33 @@ ul.icons li [class*=" icon-"] {
[class*=" icon-"].pull-right {
margin-left: .3em;
}
-.btn [class^="icon-"].pull-left.icon-2x,
-.btn [class*=" icon-"].pull-left.icon-2x,
-.btn [class^="icon-"].pull-right.icon-2x,
-.btn [class*=" icon-"].pull-right.icon-2x {
- margin-top: .18em;
-}
-.btn [class^="icon-"].icon-spin.icon-large,
-.btn [class*=" icon-"].icon-spin.icon-large {
- line-height: .8em;
-}
-.btn.btn-small [class^="icon-"].pull-left.icon-2x,
-.btn.btn-small [class*=" icon-"].pull-left.icon-2x,
-.btn.btn-small [class^="icon-"].pull-right.icon-2x,
-.btn.btn-small [class*=" icon-"].pull-right.icon-2x {
- margin-top: .25em;
-}
.btn.btn-large [class^="icon-"],
.btn.btn-large [class*=" icon-"] {
margin-top: 0;
}
-.btn.btn-large [class^="icon-"].pull-left.icon-2x,
-.btn.btn-large [class*=" icon-"].pull-left.icon-2x,
-.btn.btn-large [class^="icon-"].pull-right.icon-2x,
-.btn.btn-large [class*=" icon-"].pull-right.icon-2x {
- margin-top: .05em;
-}
-.btn.btn-large [class^="icon-"].pull-left.icon-2x,
-.btn.btn-large [class*=" icon-"].pull-left.icon-2x {
- margin-right: .2em;
-}
-.btn.btn-large [class^="icon-"].pull-right.icon-2x,
-.btn.btn-large [class*=" icon-"].pull-right.icon-2x {
- margin-left: .2em;
-}
-.icon-spin {
- display: inline-block;
- -moz-animation: spin 2s infinite linear;
- -o-animation: spin 2s infinite linear;
- -webkit-animation: spin 2s infinite linear;
- animation: spin 2s infinite linear;
-}
-@-webkit-keyframes spin {
- 0% { -webkit-transform: rotate(0deg); }
- 100% { -webkit-transform: rotate(359deg); }
-}
-@keyframes spin {
- 0% { transform: rotate(0deg); }
- 100% { transform: rotate(359deg); }
-}
-@-moz-document url-prefix() {
- .icon-spin {
- height: .9em;
- }
- .btn .icon-spin {
- height: auto;
- }
- .icon-spin.icon-large {
- height: 1.25em;
- }
- .btn .icon-spin.icon-large {
- height: .75em;
- }
-}
/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
readers do not read off random characters that represent icons */
-.icon-glass:before { content: "\f000"; }
-.icon-music:before { content: "\f001"; }
-.icon-search:before { content: "\f002"; }
-.icon-envelope:before { content: "\f003"; }
-.icon-heart:before { content: "\f004"; }
-.icon-star:before { content: "\f005"; }
-.icon-star-empty:before { content: "\f006"; }
-.icon-user:before { content: "\f007"; }
-.icon-film:before { content: "\f008"; }
-.icon-th-large:before { content: "\f009"; }
-.icon-th:before { content: "\f00a"; }
-.icon-th-list:before { content: "\f00b"; }
-.icon-ok:before { content: "\f00c"; }
-.icon-remove:before { content: "\f00d"; }
-.icon-zoom-in:before { content: "\f00e"; }
-
-.icon-zoom-out:before { content: "\f010"; }
-.icon-off:before { content: "\f011"; }
-.icon-signal:before { content: "\f012"; }
-.icon-cog:before { content: "\f013"; }
-.icon-trash:before { content: "\f014"; }
-.icon-home:before { content: "\f015"; }
-.icon-file:before { content: "\f016"; }
-.icon-time:before { content: "\f017"; }
-.icon-road:before { content: "\f018"; }
-.icon-download-alt:before { content: "\f019"; }
-.icon-download:before { content: "\f01a"; }
-.icon-upload:before { content: "\f01b"; }
-.icon-inbox:before { content: "\f01c"; }
-.icon-play-circle:before { content: "\f01d"; }
-.icon-repeat:before { content: "\f01e"; }
-
-/* \f020 doesn't work in Safari. all shifted one down */
-.icon-refresh:before { content: "\f021"; }
-.icon-list-alt:before { content: "\f022"; }
-.icon-lock:before { content: "\f023"; }
-.icon-flag:before { content: "\f024"; }
-.icon-headphones:before { content: "\f025"; }
-.icon-volume-off:before { content: "\f026"; }
-.icon-volume-down:before { content: "\f027"; }
-.icon-volume-up:before { content: "\f028"; }
-.icon-qrcode:before { content: "\f029"; }
-.icon-barcode:before { content: "\f02a"; }
-.icon-tag:before { content: "\f02b"; }
-.icon-tags:before { content: "\f02c"; }
-.icon-book:before { content: "\f02d"; }
-.icon-bookmark:before { content: "\f02e"; }
-.icon-print:before { content: "\f02f"; }
-
-.icon-camera:before { content: "\f030"; }
-.icon-font:before { content: "\f031"; }
-.icon-bold:before { content: "\f032"; }
-.icon-italic:before { content: "\f033"; }
-.icon-text-height:before { content: "\f034"; }
-.icon-text-width:before { content: "\f035"; }
-.icon-align-left:before { content: "\f036"; }
-.icon-align-center:before { content: "\f037"; }
-.icon-align-right:before { content: "\f038"; }
-.icon-align-justify:before { content: "\f039"; }
-.icon-list:before { content: "\f03a"; }
-.icon-indent-left:before { content: "\f03b"; }
-.icon-indent-right:before { content: "\f03c"; }
-.icon-facetime-video:before { content: "\f03d"; }
-.icon-picture:before { content: "\f03e"; }
-
-.icon-pencil:before { content: "\f040"; }
-.icon-map-marker:before { content: "\f041"; }
-.icon-adjust:before { content: "\f042"; }
-.icon-tint:before { content: "\f043"; }
-.icon-edit:before { content: "\f044"; }
-.icon-share:before { content: "\f045"; }
-.icon-check:before { content: "\f046"; }
-.icon-move:before { content: "\f047"; }
-.icon-step-backward:before { content: "\f048"; }
-.icon-fast-backward:before { content: "\f049"; }
-.icon-backward:before { content: "\f04a"; }
-.icon-play:before { content: "\f04b"; }
-.icon-pause:before { content: "\f04c"; }
-.icon-stop:before { content: "\f04d"; }
-.icon-forward:before { content: "\f04e"; }
-
-.icon-fast-forward:before { content: "\f050"; }
-.icon-step-forward:before { content: "\f051"; }
-.icon-eject:before { content: "\f052"; }
-.icon-chevron-left:before { content: "\f053"; }
-.icon-chevron-right:before { content: "\f054"; }
-.icon-plus-sign:before { content: "\f055"; }
-.icon-minus-sign:before { content: "\f056"; }
-.icon-remove-sign:before { content: "\f057"; }
-.icon-ok-sign:before { content: "\f058"; }
-.icon-question-sign:before { content: "\f059"; }
-.icon-info-sign:before { content: "\f05a"; }
-.icon-screenshot:before { content: "\f05b"; }
-.icon-remove-circle:before { content: "\f05c"; }
-.icon-ok-circle:before { content: "\f05d"; }
-.icon-ban-circle:before { content: "\f05e"; }
-
-.icon-arrow-left:before { content: "\f060"; }
-.icon-arrow-right:before { content: "\f061"; }
-.icon-arrow-up:before { content: "\f062"; }
-.icon-arrow-down:before { content: "\f063"; }
-.icon-share-alt:before { content: "\f064"; }
-.icon-resize-full:before { content: "\f065"; }
-.icon-resize-small:before { content: "\f066"; }
-.icon-plus:before { content: "\f067"; }
-.icon-minus:before { content: "\f068"; }
-.icon-asterisk:before { content: "\f069"; }
-.icon-exclamation-sign:before { content: "\f06a"; }
-.icon-gift:before { content: "\f06b"; }
-.icon-leaf:before { content: "\f06c"; }
-.icon-fire:before { content: "\f06d"; }
-.icon-eye-open:before { content: "\f06e"; }
-
-.icon-eye-close:before { content: "\f070"; }
-.icon-warning-sign:before { content: "\f071"; }
-.icon-plane:before { content: "\f072"; }
-.icon-calendar:before { content: "\f073"; }
-.icon-random:before { content: "\f074"; }
-.icon-comment:before { content: "\f075"; }
-.icon-magnet:before { content: "\f076"; }
-.icon-chevron-up:before { content: "\f077"; }
-.icon-chevron-down:before { content: "\f078"; }
-.icon-retweet:before { content: "\f079"; }
-.icon-shopping-cart:before { content: "\f07a"; }
-.icon-folder-close:before { content: "\f07b"; }
-.icon-folder-open:before { content: "\f07c"; }
-.icon-resize-vertical:before { content: "\f07d"; }
-.icon-resize-horizontal:before { content: "\f07e"; }
-
-.icon-bar-chart:before { content: "\f080"; }
-.icon-twitter-sign:before { content: "\f081"; }
-.icon-facebook-sign:before { content: "\f082"; }
-.icon-camera-retro:before { content: "\f083"; }
-.icon-key:before { content: "\f084"; }
-.icon-cogs:before { content: "\f085"; }
-.icon-comments:before { content: "\f086"; }
-.icon-thumbs-up:before { content: "\f087"; }
-.icon-thumbs-down:before { content: "\f088"; }
-.icon-star-half:before { content: "\f089"; }
-.icon-heart-empty:before { content: "\f08a"; }
-.icon-signout:before { content: "\f08b"; }
-.icon-linkedin-sign:before { content: "\f08c"; }
-.icon-pushpin:before { content: "\f08d"; }
-.icon-external-link:before { content: "\f08e"; }
-
-.icon-signin:before { content: "\f090"; }
-.icon-trophy:before { content: "\f091"; }
-.icon-github-sign:before { content: "\f092"; }
-.icon-upload-alt:before { content: "\f093"; }
-.icon-lemon:before { content: "\f094"; }
-.icon-phone:before { content: "\f095"; }
-.icon-check-empty:before { content: "\f096"; }
-.icon-bookmark-empty:before { content: "\f097"; }
-.icon-phone-sign:before { content: "\f098"; }
-.icon-twitter:before { content: "\f099"; }
-.icon-facebook:before { content: "\f09a"; }
-.icon-github:before { content: "\f09b"; }
-.icon-unlock:before { content: "\f09c"; }
-.icon-credit-card:before { content: "\f09d"; }
-.icon-rss:before { content: "\f09e"; }
-
-.icon-hdd:before { content: "\f0a0"; }
-.icon-bullhorn:before { content: "\f0a1"; }
-.icon-bell:before { content: "\f0a2"; }
-.icon-certificate:before { content: "\f0a3"; }
-.icon-hand-right:before { content: "\f0a4"; }
-.icon-hand-left:before { content: "\f0a5"; }
-.icon-hand-up:before { content: "\f0a6"; }
-.icon-hand-down:before { content: "\f0a7"; }
-.icon-circle-arrow-left:before { content: "\f0a8"; }
-.icon-circle-arrow-right:before { content: "\f0a9"; }
-.icon-circle-arrow-up:before { content: "\f0aa"; }
-.icon-circle-arrow-down:before { content: "\f0ab"; }
-.icon-globe:before { content: "\f0ac"; }
-.icon-wrench:before { content: "\f0ad"; }
-.icon-tasks:before { content: "\f0ae"; }
-
-.icon-filter:before { content: "\f0b0"; }
-.icon-briefcase:before { content: "\f0b1"; }
-.icon-fullscreen:before { content: "\f0b2"; }
-
-.icon-group:before { content: "\f0c0"; }
-.icon-link:before { content: "\f0c1"; }
-.icon-cloud:before { content: "\f0c2"; }
-.icon-beaker:before { content: "\f0c3"; }
-.icon-cut:before { content: "\f0c4"; }
-.icon-copy:before { content: "\f0c5"; }
-.icon-paper-clip:before { content: "\f0c6"; }
-.icon-save:before { content: "\f0c7"; }
-.icon-sign-blank:before { content: "\f0c8"; }
-.icon-reorder:before { content: "\f0c9"; }
-.icon-list-ul:before { content: "\f0ca"; }
-.icon-list-ol:before { content: "\f0cb"; }
-.icon-strikethrough:before { content: "\f0cc"; }
-.icon-underline:before { content: "\f0cd"; }
-.icon-table:before { content: "\f0ce"; }
-
-.icon-magic:before { content: "\f0d0"; }
-.icon-truck:before { content: "\f0d1"; }
-.icon-pinterest:before { content: "\f0d2"; }
-.icon-pinterest-sign:before { content: "\f0d3"; }
-.icon-google-plus-sign:before { content: "\f0d4"; }
-.icon-google-plus:before { content: "\f0d5"; }
-.icon-money:before { content: "\f0d6"; }
-.icon-caret-down:before { content: "\f0d7"; }
-.icon-caret-up:before { content: "\f0d8"; }
-.icon-caret-left:before { content: "\f0d9"; }
-.icon-caret-right:before { content: "\f0da"; }
-.icon-columns:before { content: "\f0db"; }
-.icon-sort:before { content: "\f0dc"; }
-.icon-sort-down:before { content: "\f0dd"; }
-.icon-sort-up:before { content: "\f0de"; }
-
-.icon-envelope-alt:before { content: "\f0e0"; }
-.icon-linkedin:before { content: "\f0e1"; }
-.icon-undo:before { content: "\f0e2"; }
-.icon-legal:before { content: "\f0e3"; }
-.icon-dashboard:before { content: "\f0e4"; }
-.icon-comment-alt:before { content: "\f0e5"; }
-.icon-comments-alt:before { content: "\f0e6"; }
-.icon-bolt:before { content: "\f0e7"; }
-.icon-sitemap:before { content: "\f0e8"; }
-.icon-umbrella:before { content: "\f0e9"; }
-.icon-paste:before { content: "\f0ea"; }
-.icon-lightbulb:before { content: "\f0eb"; }
-.icon-exchange:before { content: "\f0ec"; }
-.icon-cloud-download:before { content: "\f0ed"; }
-.icon-cloud-upload:before { content: "\f0ee"; }
-
-.icon-user-md:before { content: "\f0f0"; }
-.icon-stethoscope:before { content: "\f0f1"; }
-.icon-suitcase:before { content: "\f0f2"; }
-.icon-bell-alt:before { content: "\f0f3"; }
-.icon-coffee:before { content: "\f0f4"; }
-.icon-food:before { content: "\f0f5"; }
-.icon-file-alt:before { content: "\f0f6"; }
-.icon-building:before { content: "\f0f7"; }
-.icon-hospital:before { content: "\f0f8"; }
-.icon-ambulance:before { content: "\f0f9"; }
-.icon-medkit:before { content: "\f0fa"; }
-.icon-fighter-jet:before { content: "\f0fb"; }
-.icon-beer:before { content: "\f0fc"; }
-.icon-h-sign:before { content: "\f0fd"; }
-.icon-plus-sign-alt:before { content: "\f0fe"; }
-
-.icon-double-angle-left:before { content: "\f100"; }
-.icon-double-angle-right:before { content: "\f101"; }
-.icon-double-angle-up:before { content: "\f102"; }
-.icon-double-angle-down:before { content: "\f103"; }
-.icon-angle-left:before { content: "\f104"; }
-.icon-angle-right:before { content: "\f105"; }
-.icon-angle-up:before { content: "\f106"; }
-.icon-angle-down:before { content: "\f107"; }
-.icon-desktop:before { content: "\f108"; }
-.icon-laptop:before { content: "\f109"; }
-.icon-tablet:before { content: "\f10a"; }
-.icon-mobile-phone:before { content: "\f10b"; }
-.icon-circle-blank:before { content: "\f10c"; }
-.icon-quote-left:before { content: "\f10d"; }
-.icon-quote-right:before { content: "\f10e"; }
-
-.icon-spinner:before { content: "\f110"; }
-.icon-circle:before { content: "\f111"; }
-.icon-reply:before { content: "\f112"; }
-.icon-github-alt:before { content: "\f113"; }
-.icon-folder-close-alt:before { content: "\f114"; }
-.icon-folder-open-alt:before { content: "\f115"; }
+.icon-bolt:before { content: "\f0e7"; } /* Used: learn */
+.icon-calendar:before { content: "\f073"; } /* Used: learn */
+.icon-certificate:before { content: "\f0a3"; } /* Used: learn */
+.icon-chevron-left:before { content: "\f053"; } /* Used: learn */
+.icon-chevron-right:before { content: "\f054"; } /* Used: learn */
+.icon-comments:before { content: "\f086"; } /* Used: footer */
+.icon-copy:before { content: "\f0c5"; } /* Used: releases */
+.icon-dashboard:before { content: "\f0e4"; } /* Used: learn */
+.icon-eye-open:before { content: "\f06e"; } /* Used: jqueryui.com */
+.icon-github:before { content: "\f09b"; } /* Used: footer */
+.icon-link:before { content: "\f0c1"; } /* Used: toc-link, grunt-jquery-content */
+.icon-magnet:before { content: "\f076"; } /* Used: learn */
+.icon-pencil:before { content: "\f040"; } /* Used: footer */
+.icon-picture:before { content: "\f03e"; } /* Used: learn */
+.icon-question-sign:before { content: "\f059"; } /* Used: learn */
+.icon-refresh:before { content: "\f021"; } /* Used: learn */
+.icon-sitemap:before { content: "\f0e8"; } /* Used: learn */
+.icon-star-empty:before { content: "\f006"; } /* Used: learn */
+.icon-tasks:before { content: "\f0ae"; } /* Used: learn */
+.icon-th-large:before { content: "\f009"; } /* Used: learn */
+.icon-twitter:before { content: "\f099"; } /* Used: footer */
/* Manual Font Awesome Styles */
[class^="icon-"]::before, [class^="icon-"]::after,
@@ -1225,28 +783,20 @@ iframe {
}
#container {
- background: #0769AD;
+ background: #0769ad;
margin: 0 auto;
padding: 0 20px;
}
.jquery-ui #container {
- background: #B24926;
+ background: #b24926;
}
.jquery-mobile #container {
background: #108040;
}
-.sizzlejs #container {
- background: #9A1B1E;
-}
-
-.qunitjs #container {
- background: #390F39;
-}
-
.jquery-foundation #container {
background: #333;
}
@@ -1263,8 +813,15 @@ iframe {
border-radius: 0 0 10px 10px;
position: relative;
}
-.no-boxshadow #content-wrapper {
- border: 1px solid #333;
+
+.jquery-ui #content-wrapper,
+.jquery-ui #banner-secondary,
+.jquery-foundation #content-wrapper,
+.jquery-foundation #banner-secondary,
+.jquery-learn #content-wrapper,
+.jquery-learn #banner-secondary {
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
}
.constrain {
@@ -1309,11 +866,9 @@ iframe {
float: right;
margin-right: -25px;
position: relative;
- -webkit-border-image: -webkit-linear-gradient(#ffffff, #e7e7e7 15%, #e7e7e7 85%, #ffffff);
border-image: linear-gradient(#ffffff, #e7e7e7 15%, #e7e7e7 85%, #ffffff);
box-shadow: inset 15px 0 5px -16px #e7e7e7;
- background-image: -webkit-radial-gradient(left, #f2f2f2, #ffffff 80%);
- background-image: radial-gradient(left, #f2f2f2, #ffffff 80%);
+ background-image: radial-gradient(ellipse at left, #f2f2f2, #ffffff 80%);
border: 0;
border-left: 1px solid #efefef;
}
@@ -1325,23 +880,36 @@ iframe {
border-left: 0;
border-right: 1px solid #e7e7e7;
margin: -20px 0 0 -25px;
- -webkit-border-image: -webkit-linear-gradient(#ffffff, #e7e7e7 15%, #e7e7e7 85%, #ffffff);
border-image: linear-gradient(#ffffff, #e7e7e7 15%, #e7e7e7 85%, #ffffff);
box-shadow: inset 15px 0 5px -16px #e7e7e7;
- background-image: -webkit-radial-gradient(right, #f2f2f2, #ffffff 80%);
- background-image: radial-gradient(right, #f2f2f2, #ffffff 80%);
+ background-image: radial-gradient(ellipse at right, #f2f2f2, #ffffff 80%);
}
.entry-summary p {
margin: 0;
}
+/* Support message at top of page.
+ ========================================================================== */
+
+#banner {
+ text-align: center;
+ background-color: #dddddd;
+ padding: 0.25em 1.25em;
+ color: #333; /* jQuery Black */
+}
+
+#banner a:hover {
+ text-decoration: none;
+}
/* Global Nav
========================================================================== */
#global-nav {
- background: url(../images/jq-global-nav.png) repeat-x 0 bottom #1b1b1b;
+ background: #232323;
+ background: linear-gradient(to bottom, transparent 92%, rgb(20, 20, 20)),
+ linear-gradient(to bottom, rgb(75, 75, 75), #232323);
}
#global-nav nav {
@@ -1358,9 +926,6 @@ iframe {
border-left: 1px solid rgba(0, 0, 0, 0.347656);
}
-.tinynav-container { display: none }
-.tinynav { display: none }
-
#global-nav nav ul.links {
float: right;
}
@@ -1373,7 +938,7 @@ iframe {
top: 1px;
cursor: pointer;
transition: all 0.2s;
- text-shadow: 0 0px 2px #000;
+ text-shadow: 0 0 2px #000;
border-left: 1px solid rgba(255, 255, 255, 0.0976562);
border-right: 1px solid rgba(0, 0, 0, 0.347656);
}
@@ -1382,7 +947,7 @@ iframe {
}
#global-nav nav ul li:hover {
- background: url(../images/bg-footer-noise.jpg) #000;
+ background: #232323;
color: #fff;
}
@@ -1397,6 +962,7 @@ iframe {
text-decoration: none;
display: block;
padding: 8px 12px;
+ white-space: nowrap;
}
#global-nav nav ul li ul {
@@ -1404,7 +970,7 @@ iframe {
position: absolute;
top: 32px;
left: -2px;
- width: 120px;
+ min-width: 120px;
display: none;
opacity: 0;
visibility: hidden;
@@ -1418,7 +984,7 @@ iframe {
}
#global-nav nav ul li ul li {
- background: url(../images/bg-footer-noise.jpg) #000;
+ background: #232323;
display: block;
color: #fff;
float: none;
@@ -1446,19 +1012,19 @@ iframe {
}
#global-nav nav ul.projects li.jquery-ui {
- background-position: -57px 0px;
+ background-position: -57px 0;
}
#global-nav nav ul.projects li.jquery-mobile {
- background-position: -107px 0px;
+ background-position: -107px 0;
}
#global-nav nav ul.projects li.sizzlejs {
- background-position: -155px 0px;
+ background-position: -155px 0;
}
#global-nav nav ul.projects li.qunitjs {
- background-position: -204px 0px;
+ background-position: -204px 0;
}
.jquery #global-nav nav ul.projects li.jquery {
@@ -1518,64 +1084,19 @@ iframe {
}
-.sizzlejs #global-nav nav ul.projects li.jquery-mobile {
- border-right: none;
- background-position: -102px 0;
-}
-
-.sizzlejs #global-nav nav ul.projects li.sizzlejs {
- background-position: -148px bottom;
- width: 52px;
- position: relative;
- margin-top:1px;
- border: none;
-}
-
-.sizzlejs #global-nav nav ul.projects li.qunitjs{
- border-left: none;
- background-position: -206px 0;
-}
-
-
-.qunitjs #global-nav nav ul.projects li.sizzlejs {
- border-right: none;
-}
-
-.qunitjs #global-nav nav ul.projects li.qunitjs {
- background-position: -202px bottom;
- width: 52px;
- position: relative;
- margin-top:1px;
- border: none;
-}
-
-.qunitjs #global-nav nav ul.projects {
- border-right: none;
-}
-
#container,
footer {
- border-top: 1px solid #7ACEF4;
+ border-top: 1px solid #7acef4;
}
.jquery-ui #container,
.jquery-ui footer {
- border-top-color: #FAA523;
+ border-top-color: #faa523;
}
.jquery-mobile #container,
.jquery-mobile footer {
- border-top-color: #3EB249;
-}
-
-.sizzlejs #container,
-.sizzlejs footer {
- border-top-color: #FAA523;
-}
-
-.qunitjs #container,
-.qunitjs footer {
- border-top-color: #9C3493;
+ border-top-color: #3eb249;
}
.jquery-learn #container,
@@ -1586,31 +1107,31 @@ footer {
/* Brand Colors for General Use
========================================================================== */
.color.black { background-color: #333; }
-.color.primary-blue { background-color: #0769AD; }
-.color.secondary-blue { background-color: #7ACEF4; }
-.color.navy-blue { background-color: #131B28; }
-.color.primary-orange { background-color: #FAA523; }
-.color.secondary-orange { background-color: #B24926; }
-.color.primary-green { background-color: #3EB249; }
+.color.primary-blue { background-color: #0769ad; }
+.color.secondary-blue { background-color: #7acef4; }
+.color.navy-blue { background-color: #131b28; }
+.color.primary-orange { background-color: #faa523; }
+.color.secondary-orange { background-color: #b24926; }
+.color.primary-green { background-color: #3eb249; }
.color.secondary-green { background-color: #108040; }
-.color.sizzle-orange { background-color: #FAA523; }
-.color.sizzle-red { background-color: #9A1B1E; }
-.color.qunit-primary-purple { background-color: #9C3493; }
-.color.qunit-secondary-purple { background-color: #390F39; }
-.color.globalize-primary-aqua { background-color: #009B93; }
-.color.globalize-secondary-aqua { background-color: #41586B; }
+.color.sizzle-orange { background-color: #faa523; }
+.color.sizzle-red { background-color: #9a1B1E; }
+.color.qunit-primary-purple { background-color: #9c3493; }
+.color.qunit-secondary-purple { background-color: #390f39; }
+.color.globalize-primary-aqua { background-color: #009b93; }
+.color.globalize-secondary-aqua { background-color: #41586b; }
/* Logo & Navigation
========================================================================== */
#logo-events {
clear: both;
- padding: 20px 0;
+ padding: 25px 20px;
}
h2.logo {
float: left;
- margin: 20px 0 0 0;
+ margin: 0;
width: 243px;
}
@@ -1638,26 +1159,11 @@ h2.logo a {
background: url(../images/logo-jquery-mobile.png) no-repeat;
}
-.sizzlejs h2.logo a {
- width: 243px;
- background: url(../images/logo-sizzle.png) no-repeat;
-}
-
-.qunitjs h2.logo a {
- width: 243px;
- background: url(../images/logo-qunit.png) no-repeat;
-}
-
.jquery-foundation h2.logo a {
width: 243px;
background: url(../images/logo-jquery-foundation.png) no-repeat;
}
-.jquery-events.jquery-foundation h2.logo a {
- width: 243px;
- background: url(../images/logo-jquery-events.png) no-repeat;
-}
-
.logo.small {
height: 30px;
background: url('../images/projectlogosfull-small.png') no-repeat;
@@ -1665,31 +1171,27 @@ h2.logo a {
.jquery.logo.small {
width:109px;
- background-position: -0px 0px;
+ background-position: -0 0;
}
.jquery-foundation.logo.small {
width: 109px;
- background-position: -109px 0px;
-}
-.jquery-events.logo.small {
- width: 109px;
- background-position: -219px 0px;
+ background-position: -109px 0;
}
.jqueryui.logo.small {
width: 114px;
- background-position: -327px 0px;
+ background-position: -327px 0;
}
.jquery-mobile.logo.small {
width: 122px;
- background-position: -442px 0px;
+ background-position: -442px 0;
}
.qunitjs.logo.small {
width: 105px;
- background-position: -564px 0px;
+ background-position: -564px 0;
}
.sizzlejs.logo.small {
width: 105px;
- background-position: -669px 0px;
+ background-position: -669px 0;
}
#logo-events aside {
@@ -1701,32 +1203,17 @@ nav#main {
border-radius: 10px 10px 0 0;
border-right: 1px solid rgba(2, 2, 2, 0.28);
border-left: 1px solid rgba(2, 2, 2, 0.28);
- border-top: 1px solid rgba(250, 250, 250, 0.27);
- box-shadow: rgba(255,255,255,0.3) 0 1px 0, rgba(0,0,0,0.3) 0 -1px 0;
+ border-top: 1px solid rgba(250, 250, 250, 0.14);
box-shadow: 0 0 5px rgba(1, 1, 1, 0.7);
}
-.jquery-ui nav#main,
-.sizzlejs nav#main {
+.jquery-ui nav#main {
background-color: rgba(12, 12, 12, 0.06);
}
-.qunitjs nav#main {
- background-color: rgba(156, 52, 147, 0.5);
-}
.jquery-learn nav#main {
background-color: rgba(0, 0, 0, 0.4);
}
-.jquery-foundation nav#main {
- background-color: rgba(102, 102, 102, 0.1);
-}
-
-.no-boxshadow nav#main {
- border-top: 1px solid #333;
- border-left: 1px solid #333;
- border-right: 1px solid #333;
-}
-
nav#main ul {
margin: 0;
float: left;
@@ -1737,104 +1224,89 @@ nav#main ul {
nav#main li {
float: left;
- font: normal normal 16px "klavika-web", "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
+ font: normal 700 16px Cairo, "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
margin-right: 2px;
}
nav#main li a {
color: #fff;
text-decoration: none;
- padding: 6px 10px;
+ padding: 0 10px;
+ line-height: 32px;
display: block;
border: 1px solid transparent;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.76);
}
nav#main li a:hover,
-nav#main li.current a,
-nav#main .searchform {
+nav#main li.current a {
background: none;
box-shadow: inset 0 0 5px rgba(0,0,0, 0.4), rgba(255,255,255,0.1) 0 1px 0;
border-radius: 4px;
border: 1px solid rgba(0,0,0,0.25);
color: #fff;
- text-shadow: rgba(0, 0, 0, 0.796875) 0px -1px 0px, rgba(255, 255, 255, 0.296875) 0px 0px 10px;
+ text-shadow: rgba(0, 0, 0, 0.796875) 0 -1px 0, rgba(255, 255, 255, 0.296875) 0 0 10px;
}
-nav#main .searchform {
+.searchform {
float: right;
- width: 28%;
- margin-top: 12px;
- margin-bottom: 12px;
- padding: 0;
- border-radius: 20px;
- position: relative;
-}
-
-nav#main .searchform input {
- text-decoration: none;
- font: 12px/12px "Lucida Grande", Lucida, Verdana, sans-serif;
- padding: 5px 10px;
- margin: 0;
- background-color: transparent;
- border-style: none;
- color: #fff;
- line-height: 1.3;
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.76);
- width: 85%;
- box-shadow: none;
-}
-
-nav#main .searchform input:focus {
- outline: none;
-}
-
-.no-boxshadow nav#main .searchform {
- border: 1px solid #333;
-}
-
-.no-boxshadow nav#main .searchform input {
- background: #fff;
- color: #333;
-}
-
-/*
- * 1. :-moz-placeholder has been deprecated in favor of ::-moz-placeholder.
- * 2. Using :placeholder for completeness.
- */
-nav#main .searchform input::-webkit-input-placeholder {
- color: #fff;
-}
-nav#main .searchform input:-moz-placeholder { /* 1 */
- color: #fff;
-}
-nav#main .searchform input::-moz-placeholder {
- color: #fff;
-}
-nav#main .searchform input:-ms-input-placeholder {
- color: #fff;
-}
-nav#main .searchform input:placeholder { /* 2 */
- color: #fff;
+ margin: 6px 0;
+ width: 30%;
}
-
-nav#main .searchform .icon-search {
- position: absolute;
- right: 10px;
- top: 3px;
- bottom: 3px;
+.searchform input {
+ font-family: "Lucida Grande", Lucida, Verdana, sans-serif;
+}
+
+typesense-minibar {
+ --tsmb-size-radius: 5px;
+ --tsmb-size-base: 12px;
+ --tsmb-size-sm: 0.8rem;
+ --tsmb-size-listbox-right: 0;
+ --tsmb-color-base-background: var(--tsmb-color-primary50);
+ --tsmb-color-base30: #fff;
+ --tsmb-color-base50: var(--tsmb-color-primary90);
+ --tsmb-color-base90: var(--tsmb-color-primary90);
+ --tsmb-color-focus30: #666;
+ --tsmb-color-focus50: #444;
+ --tsmb-color-focus90: #ccc;
+ --tsmb-color-primary30: #333; /* jQuery Black */
+ --tsmb-color-primary50: #0769ad; /* jQuery Primary Blue */
+ --tsmb-color-primary90: #b4efff; /* oklch(0.92 0.07 228) hue=228 of #7ACEF4 (jQuery Secondary Blue) */
+}
+.jquery-ui typesense-minibar {
+ --tsmb-color-primary50: #b24926; /* jQuery UI Secondary Orange */
+ --tsmb-color-primary90: #ffddb2; /* = #b4efff + oklch(hue=70) of #FAA523 (jQuery UI Primary Orange) */
+}
+.jquery-mobile typesense-minibar {
+ --tsmb-color-primary50: #108040; /* jQuery Mobile Secondary Green */
+ --tsmb-color-primary90: #c9f2c8; /* = #b4efff + oklch(hue=144) of #3EB249 (jQuery UI Primary Orange) */
+}
+.jquery-foundation typesense-minibar {
+ --tsmb-color-primary50: #333; /* jQuery Black */
+ --tsmb-color-primary90: #ccc;
+}
+.jquery-learn typesense-minibar {
+ --tsmb-color-primary50: #222;
+ --tsmb-color-primary90: #ccc;
+}
+typesense-minibar form:not(:focus-within)::before {
+ filter: invert();
+}
+typesense-minibar input[type=search] {
border-width: 0;
- border-left: 1px solid rgba(7, 7, 7, 0.65);
- background-color: transparent;
- padding: 0 0 0 7px;
- opacity: 0.33;
- color: #fff;
+}
+typesense-minibar[role="option"] mark {
+ border-bottom: 2px solid var(--tsmb-color-primary90);
}
#broadcast {
height: 100px;
}
+#broadcast:empty {
+ display: none;
+}
+
/* Typography & Global Styles
========================================================================== */
@@ -1870,7 +1342,7 @@ em, i {
}
hr {
- background-image: url(../images/gauze.png);
+ background: #ececec;
height: .75em;
border: none;
margin: .75em 0;
@@ -1888,17 +1360,23 @@ pre b {
#content blockquote {
margin: 20px 0;
+ padding: 20px 30px;
+ background-color: #f2f2f2;
+ color: #828282;
+ position: relative;
+ font-size: 18px;
+ line-height: 26px;
+ font-style: italic;
+ text-shadow: 0 1px 0 #ffffff;
}
#content blockquote p {
- font: italic normal 23px/26px "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
- color: #828282;
margin-left: 0;
margin-bottom: 0;
- padding: 20px 30px;
- position: relative;
- text-shadow: 0 1px 0 #ffffff;
- background-color: #f2f2f2;
+}
+#content blockquote b,
+#content blockquote strong {
+ color: inherit;
}
#content ol,
@@ -1911,20 +1389,14 @@ pre b {
}
#content ul li {
- padding-bottom: 5px;
- padding-top: 5px;
- padding-left: 20px;
+ padding: 5px 0 5px 12px;
+ margin-left: 8px;
line-height: 20px;
- list-style-type: none;
- background: url(../images/bullet.png) no-repeat 0 10px;
}
-#content ul.block-grid li {
- background: none;
-}
-
-#content ol {
- counter-reset: li; /* Initiate a counter */
+#content ul li::marker {
+ content: "●";
+ color: #ccc;
}
#content ol > li {
@@ -1935,38 +1407,6 @@ pre b {
margin-top: 5px;
margin-left: 30px;
}
-#content ol > li:before {
- content: counter(li); /* Use the counter as content */
- counter-increment: li; /* Increment the counter by 1 */
- /* Position and style the number */
- position: absolute;
- top: 1px;
- left: -25px;
- box-sizing: border-box;
- width: 20px;
- /* Some space between the number and the content in browsers that support
- generated content but not positioning it */
- color: #fff;
- text-align: center;
- background-color: #ababab;
- height: 19px;
- width: 19px;
- padding-top: 0px;
- font: bold 11px/19px "klavika-web", "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
- border-radius: 12px;
-}
-
-.lt-ie8 #content ol,
-.lt-ie7 #content ol {
- margin-left: 20px;
-}
-
-.lt-ie8 #content ol li,
-.lt-ie7 #content ol li {
- margin-left: 30px;
- list-style-type: decimal;
- padding-left: 0px;
-}
#content img.full,
#content figure.full {
@@ -1975,19 +1415,9 @@ pre b {
max-width: 100%;
}
-.lt-ie8 #content figure img {
- position: relative;
-}
-
-.lt-ie7 #content figure.full,
-.lt-ie8 #content figure.full {
- width: 99%;
-}
-
#content img.full,
#content img.left,
-#content img.right,
-#banner img.full {
+#content img.right {
box-shadow: 0 0 5px 1px rgba(0, 0, 0, 0.20);
}
@@ -2014,15 +1444,6 @@ pre b {
margin-left: 15px;
}
-.lt-ie8 #content img.right,
-.lt-ie8 #content figure.right,
-.lt-ie7 #content img.right,
-.lt-ie7 #content figure.right {
- float: left;
- margin-left: 0px;
- margin-right: 15px;
-}
-
#content img.left,
#content figure.left {
margin-right: 15px;
@@ -2030,17 +1451,13 @@ pre b {
#content figure img {
- margin: 0px !important;
- margin-bottom: 0px !important;
+ margin: 0 !important;
}
#content figcaption {
- box-shadow: 0px 0px 5px 1px rgba(0, 0, 0, 0.20);
- font: italic 700 12px/20px "klavika-web", "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
- padding-left: 10px;
- padding-right: 10px;
- padding-top: 5px;
- padding-bottom: 5px;
+ box-shadow: 0 0 5px 1px rgba(0, 0, 0, 0.20);
+ font: italic 700 12px/20px Cairo, "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
+ padding: 10px 5px;
color: #737272;
clear: both;
margin-top: -10px;
@@ -2059,14 +1476,10 @@ pre b {
padding-bottom: 56.25%; /* 16/9 ratio */
height: 0;
overflow: hidden;
- box-shadow: 0px 0px 5px 1px rgba(0, 0, 0, 0.20);
+ box-shadow: 0 0 5px 1px rgba(0, 0, 0, 0.20);
margin-bottom: 20px;
}
-#portfolio.media #banner .embed {
- margin-bottom: 40px;
-}
-
.embed iframe,
.embed_media iframe,
.embed object,
@@ -2105,13 +1518,13 @@ pre b {
#content h1.block,
#content h2.block {
padding: 10px 2%;
- background: url(../images/gauze.png) #ececec;
+ background: #ececec;
text-shadow: 0 1px 0 #ffffff;
}
p.author {
color: #ababab;
- font-family: "klavika-web", "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
+ font-family: Cairo, "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
font-weight: 700;
margin-top: -20px;
}
@@ -2124,9 +1537,10 @@ p.author a {
padding: 2%;
padding-bottom: .5%;
margin-bottom: 20px;
- font: 700 "klavika-web", "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
+ font-weight: 700;
+ font-family: Cairo, "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
color: #666;
- background: url(../images-foundation/gauze.png) #f0f0f0;
+ background: #f0f0f0;
text-shadow: 0 1px 0 #ffffff;
}
@@ -2147,15 +1561,15 @@ p.author a {
}
#banner-large-image h1, #banner-large-image h2 {
- font: bold 60px/60px "klavika-web", "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
+ font: bold 60px/60px Cairo, "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
margin-bottom: 0;
color: #fff;
text-shadow: 0 0 4px rgba(0, 0, 0, 0.85);
}
#banner-large-image p {
- color: #CCCCCC;
- font: 700 normal 24px/36px "klavika-web", "Helvetica Neue", sans-serif;
+ color: #cccccc;
+ font: 700 normal 24px/36px Cairo, "Helvetica Neue", sans-serif;
}
#banner-secondary {
@@ -2190,7 +1604,7 @@ p.author a {
#banner-secondary a,
#banner-secondary a:hover {
- color: #7ACEF4;
+ color: #7acef4;
}
#banner-secondary em,
@@ -2228,11 +1642,6 @@ p.author a {
text-align: center !important;
}
-.callout-block {
- background-image: url(../images/gauze.png);
- padding: 20px;
-}
-
/* Buttons
========================================================================== */
@@ -2245,14 +1654,14 @@ input[type="submit"] {
box-shadow:
0 0 5px rgba(0, 0, 0, 0.28),
inset 0 1px 0 rgba(255, 255, 255, 0.45),
- inset 0px -1px 0px rgba(255, 255, 255, 0.45),
- inset 1px 0px 0px rgba(255, 255, 255, 0.45),
- inset -1px 1px 0px rgba(255, 255, 255, 0.45);
+ inset 0 -1px 0 rgba(255, 255, 255, 0.45),
+ inset 1px 0 0 rgba(255, 255, 255, 0.45),
+ inset -1px 1px 0 rgba(255, 255, 255, 0.45);
text-decoration: none;
color: #fff !important;
text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.35);
padding: 8px 15px;
- font: bold 16px/16px "klavika-web", "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
+ font: bold 16px/16px Cairo, "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
transition: all 0.2s;
background-color: #d18f4f;
float: left;
@@ -2262,9 +1671,18 @@ a.button:hover,
#content a.button:hover,
.button:hover,
input[type="submit"]:hover {
+ border-color: #b24926;
background-color: #cc8540;
}
+a.button:active,
+#content a.button:active,
+.button:active,
+input[type="submit"]:active {
+ border-color: #b24926;
+ background-color: #b24926;
+}
+
a.button.large,
#content a.button.large,
button.large,
@@ -2291,8 +1709,8 @@ input[type="submit"].dark:hover {
========================================================================== */
#sidebar h3 {
- font: 20px/18px;
- background-image: -webkit-linear-gradient(left, #efefef, #f3f3f3);
+ font-size: 20px;
+ line-height: 18px;
background-image: linear-gradient(to right, #efefef, #f3f3f3);
margin-left: -20px;
margin-right: -20px;
@@ -2301,12 +1719,18 @@ input[type="submit"].dark:hover {
}
#sidebar li {
- padding: 5px 0 5px 20px;
- list-style-type: none;
- background: url(../images/bullet.png) no-repeat 0 12px;
+ padding: 5px 0 5px 12px;
+ margin-left: 8px;
+ /* set explicitly to avoid default of "circle" on sub list */
+ list-style-type: disc;
text-shadow: 0 1px 0 #ffffff;
}
+#sidebar li::marker {
+ color: #ccc;
+ content: "●";
+}
+
#sidebar li a {
color: #4d4d4d;
text-decoration: none;
@@ -2330,9 +1754,11 @@ input[type="submit"].dark:hover {
========================================================================== */
footer {
- background: url(../images/bg-footer-noise.jpg) repeat;
+ background: #232323;
+ background: #232323 linear-gradient(to bottom, rgba(0,0,0,.3), rgba(0,0,0,0)) top left / 100px 15px repeat-x;
margin-top: -20px;
padding-top: 40px;
+ color: #aaa;
}
footer.simple {
@@ -2361,60 +1787,10 @@ footer .download a { margin: 0 10px; }
footer .download a em {
font-style: normal;
- color: #aaa;
}
footer .download a:hover { border-bottom: solid 1px #888; }
-footer .footer-icon-links li {
- width: 22%;
- margin-left: 11%;
- float: left;
-}
-
-footer .footer-icon-links li a {
- display: block;
- line-height: inherit;
- font-size: 18px;
- float: left;
- position: relative;
- width: auto;
- text-align: left;
- padding-left: 10px;
-}
-
-footer .footer-icon-links li a:before {
- position: absolute;
- left: -35px;
- top: 10px;
- font-size: 2em;
- color: #4d4d4d;
- text-shadow: 0 -1px 0 #000000;
-}
-
-footer .footer-icon-links li small {
- display: block;
- font-size: 14px;
- color: #777;
- line-height: 120%;
-}
-
-footer .footer-icon-links li:hover a:before {
- color: #d1d1d1;
-}
-
-.multiplebgs.cssgradients footer {
- background-image: -webkit-linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.0)), url(../images/bg-footer-noise.jpg); /* Chrome 10+, Saf6 */
- background-image: linear-gradient(to bottom, rgba(0,0,0,.3), rgba(0,0,0,0)), url(../images/bg-footer-noise.jpg); /* Firefox 16+, IE 10+, Opera 12.50+ */
- background-repeat: repeat-x, repeat;
- background-size: 100px 15px, 140px 140px;
-}
-
-.no-multiplebgs footer, .no-cssgradients footer {
- background-image: url(../images/bg-footer-noise.jpg);
- background-repeat: repeat;
-}
-
footer h3 {
color: #777;
letter-spacing: normal;
@@ -2436,7 +1812,7 @@ footer h3 span {
padding: 3px 10px;
position: relative;
top: -0.8em;
- background: url(../images/bg-footer-noise.jpg) repeat #212121;
+ background: #232323;
z-index: 1;
}
@@ -2452,54 +1828,52 @@ footer h3:after {
border-radius: 4px 4px 0 0;
}
+footer .legal {
+ margin-top: 1em;
+ border-top: solid 1px #333;
+ box-shadow: #000 0 -1px 0;
+ padding-top: 10px;
+ color: #777;
+}
+
.footer-site-links {
float: right;
- padding: 10px 0 0 0;
width: 58%;
+ min-height: 5em; /* displace p.copyright*/
text-align: right;
}
-footer p.copyright {
- margin: 10px 0 0 0;
- float: left;
- width: 40%;
+footer p {
+ margin: 0 0 0.5em;
font-size: 11px;
line-height: 130%;
- color: #777;
-}
-
-footer p.copyright a {
- color: #aaa;
}
-footer p.copyright a:hover {
- color: #fff;
-}
-
-footer p.copyright span.sponsor-line {
- display: block;
- font-size: 10px;
- margin-top: 1em;
+footer p.copyright {
+ margin-top: 0;
+ width: 40%;
}
-footer p.copyright a.mt-link {
- background: url(../images/logo-mediatemple.png) left top no-repeat;
- padding-left: 31px;
+footer .legal a {
+ color: #aaa;
}
-footer p.copyright a.mc-link {
- background: url(../images/logo-maxcdn.png) left top no-repeat;
- padding-left: 24px;
- padding-top: 2px;
- padding-bottom: 2px;
+footer .legal a:hover {
+ color: #fff;
}
-footer p.copyright a.wp-link {
- background: url(../images/logo-wordpress.png) left top no-repeat;
- padding-left: 19px;
- padding-top: 1px;
+footer a.wp-link:before,
+footer a.do-link:before {
+ content: url(../images/logo-wordpress.svg);
display: inline-block;
- height: 16px;
+ width: 1.5em;
+ height: 1.5em;
+ padding-right: 0.5em;
+ vertical-align: bottom;
+ filter: invert(1);
+}
+footer a.do-link:before {
+ content: url(../images/logo-digitalocean.svg);
}
.footer-site-links li {
@@ -2549,12 +1923,6 @@ footer ul li {
line-height: 30px;
}
-footer #legal {
- margin-top: 1em;
- border-top: solid 1px #333;
- box-shadow: #000 0 -1px 0;
-}
-
footer .books li {
float: left;
width: 30%;
@@ -2600,8 +1968,9 @@ footer .books li a cite {
text-decoration: none;
}
-.entry-meta {
- color: #999;
+.entry-meta,
+.entry-posted {
+ color: #666;
font-size: 12px;
}
@@ -2628,6 +1997,23 @@ footer .books li a cite {
margin-bottom: 0.75em;
}
+/* WordPress requirements for theme and content */
+
+.assistive-text,
+.screen-reader-text {
+ position: absolute !important;
+ clip: rect(1px, 1px, 1px, 1px);
+ overflow: hidden;
+ height: 1px;
+ width: 1px;
+}
+.alignright {
+ float: right;
+}
+.alignleft {
+ float: left;
+}
+
/* Listing Pages (categories, searches, etc.)
========================================================================== */
@@ -2639,6 +2025,10 @@ footer .books li a cite {
background-color: #eee;
position: relative;
}
+.listing .hentry:first-child {
+ /* align top of first sidebar heading, with top of first homepage article */
+ margin-top: 0;
+}
.listing #content .entry-title {
font-size: 1.3em;
@@ -2656,16 +2046,12 @@ footer .books li a cite {
border-radius: 5px;
}
-.listing #content .entry-meta .category a {
- color: #888;
- text-decoration: none;
-}
-
.pagination {
text-align: center;
margin-top: 2em;
}
+.pagination a,
.page-numbers {
padding: 0 10px;
}
@@ -2680,7 +2066,7 @@ footer .books li a cite {
}
.entry-wrapper {
- border: 1px solid #CCC;
+ border: 1px solid #ccc;
border-top: 0;
padding: 10px;
border-radius: 0 0 5px 5px;
@@ -2695,7 +2081,6 @@ footer .books li a cite {
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5);
letter-spacing: 0;
border-radius: 5px 5px 0 0;
- font-weight: normal;
margin-bottom: 0;
overflow: hidden;
}
@@ -2729,6 +2114,9 @@ footer .books li a cite {
text-shadow: 0 1px 0 #fff;
}
+#content .signatures li::marker {
+ content: "";
+}
#content .signatures li {
list-style: none;
background: none;
@@ -2775,7 +2163,7 @@ footer .books li a cite {
}
#options, #methods, #extension-points, #events, #quick-nav {
- border: 1px solid #CCC;
+ border: 1px solid #ccc;
margin: 0 15px 15px;
padding: 10px;
overflow: auto;
@@ -2783,9 +2171,7 @@ footer .books li a cite {
#options header h2, #methods header h2, #extension-points header h2, #events header h2, #quick-nav h2 {
background: #cccccc; /* Old browsers */
- background: -webkit-linear-gradient(top, #ffffff 0%,#eeeeee 17%,#cccccc 100%); /* Chrome10+,Safari5.1+ */
background: linear-gradient(to bottom, #ffffff 0%,#eeeeee 17%,#cccccc 100%); /* W3C */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#cccccc',GradientType=0 ); /* IE6-9 */
margin: -10px -10px 10px -10px;
padding: 10px;
}
@@ -2830,7 +2216,7 @@ footer .books li a cite {
}
.signature li,
.api-item {
- border-top: 1px solid #CCC;
+ border-top: 1px solid #ccc;
}
.signature li:first-child,
@@ -2888,22 +2274,20 @@ footer .books li a cite {
color: #fff;
}
-/* Media Queries
- ========================================================================== */
-
-@media only screen and (max-width: 1100px) {
-
-}
-
-@media only screen and (max-width: 940px) {
-
+.entry-example h3 {
+ margin-top: 1em;
}
-@media only screen and (max-width: 860px) {
+/* Media Queries
+ ========================================================================== */
+@media only screen and (max-width: 807px) {
+ #content-wrapper.row {
+ min-width: 0;
+ }
}
-@media only screen and (max-width: 768px) {
+@media only screen and (max-width: 767px) {
#global-nav ul.projects li.toggle-projects {
display: none;
}
@@ -2915,22 +2299,17 @@ footer .books li a cite {
clear: both;
margin: 0;
border-top: 1px solid #e7e7e7;
- border-left: none;
+ border-right: none;
border-image: none;
box-shadow: none;
background-image: none;
- background-image: none;
- background-image: none;
- background-image: none;
- background-image: none;
- background-image: none;
}
.content-full.full-width #content,
.content-right #content,
.content-left #content {
- padding-left: 2%;
- padding-right: 2%;
+ padding-left: 15px;
+ padding-right: 15px;
}
#content {
@@ -2940,19 +2319,25 @@ footer .books li a cite {
}
#banner-secondary {
- margin-left: -15px;
- margin-right: -15px;
+ margin-left: -15px !important;
+ margin-right: -15px !important;
}
footer p.copyright,
footer ul.footer-site-links {
width: 100%;
+ min-height: auto;
+ }
+
+ footer p.copyright,
+ footer ul.footer-site-links,
+ footer p {
text-align: center;
margin: 0 0 10px 0;
}
}
-@media only screen and (max-width: 600px) {
+@media only screen and (max-width: 700px) {
#global-nav ul.projects {
display: none;
}
@@ -2965,11 +2350,6 @@ footer .books li a cite {
font-size: 12px;
}
- #logo-events {
- padding-top: 20px;
- padding-bottom: 10px;
- }
-
#logo-events aside {
display: inline-block;
position: relative;
@@ -2985,16 +2365,6 @@ footer .books li a cite {
margin-right: auto;
}
- nav#main {
- background-color: rgba(0, 0, 0, 0.0);
- border-radius: 10px 10px 0 0;
- border-right: none;
- border-left: none;
- border-top: none;
- box-shadow: none;
- padding-top: 10px;
- }
-
nav#main .searchform {
display: block;
float: none;
@@ -3002,20 +2372,23 @@ footer .books li a cite {
margin: 15px auto;
clear:both;
}
+ .searchform input[type=search] {
+ border-width: 1px;
+ }
nav#main ul{
width: auto !important;
text-align: left !important;
float: none;
- margin: 0px;
- padding: 0px;
+ margin: 0;
+ padding: 0;
}
nav#main ul li, nav#main ul li a {
display: block;
text-align: left !important;
float: left;
- margin-right: 0px;
+ margin-right: 0;
padding: 0 4px 4px 0;
}
@@ -3032,16 +2405,18 @@ footer .books li a cite {
font-size: 14px;
}
- #content-wrapper {
- border-top-left-radius: 10px;
- border-top-right-radius: 10px;
+ .content-full.full-width #content,
+ .content-right #content,
+ .content-left #content {
+ padding-left: 10px;
+ padding-right: 10px;
}
#banner-secondary {
border-top-left-radius: 9px;
border-top-right-radius: 9px;
- margin-left: -10px;
- margin-right: -10px;
+ margin-left: -10px !important;
+ margin-right: -10px !important;
}
#banner-secondary h2 {
@@ -3096,26 +2471,31 @@ footer .books li a cite {
border-top: none !important;
}
- .tinynav-container {
- display: block;
+ .menu-top-container {
+ display: flex;
+ flex-flow: column;
+ }
+
+ .menu-top-container .menu-trigger {
+ display: inline-block !important;
+ align-self: flex-end;
}
#menu-top {
display: none;
}
- .tinynav {
+ #menu-top.menu-open {
display: block;
- width: 100%;
- margin: 0 auto 15px;
- position: relative;
- top: 6px;
- left: 0px;
+ background-color: rgba(0, 0, 0, 0.18);
+ margin-top: 6px;
}
nav#main {
- margin-top: 15px;
- padding-top: 0;
+ padding: 0;
+ background: none;
+ border: none;
+ box-shadow: none;
}
nav#main .searchform {
@@ -3125,9 +2505,10 @@ footer .books li a cite {
margin: 15px auto;
}
- nav#main ul li, nav#main ul li a {
+ nav#main ul li,
+ nav#main ul li a {
float: none;
- padding: 6px 0px 6px 8px;
+ padding: 6px 0 6px 8px;
}
.constrain,
@@ -3145,6 +2526,8 @@ footer .books li a cite {
}
#content-wrapper {
+ border-top-left-radius: 10px;
+ border-top-right-radius: 10px;
padding-left: 25px;
padding-right: 25px;
}
@@ -3166,8 +2549,8 @@ footer .books li a cite {
}
#banner-secondary {
- margin-left: -25px;
- margin-right: -25px;
+ margin-left: -25px !important;
+ margin-right: -25px !important;
}
footer .footer-icon-links li a:before {
@@ -3199,30 +2582,10 @@ footer .books li a cite {
background-size: 268px 66px;
}
- .sizzlejs h2.logo a {
- background: url(../images/logo-sizzle@2x.png) no-repeat;
- background-size: 243px 66px;
- }
-
- .qunitjs h2.logo a {
- background: url(../images/logo-qunit@2x.png) no-repeat;
- background-size: 243px 66px;
- }
-
.jquery-foundation h2.logo a {
background: url(../images/logo-jquery-foundation@2x.png) no-repeat;
background-size: 243px 66px;
}
-
- .jquery-events.jquery-foundation h2.logo a {
- background: url(../images/logo-jquery-events@2x.png) no-repeat;
- background-size: 243px 66px;
- }
-}
-
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (min-resolution: 144dpi) {
-
}
/* Helper classes
@@ -3232,7 +2595,6 @@ footer .books li a cite {
background-color: transparent;
border: 0;
overflow: hidden;
- *text-indent: -9999px;
}
.ir:before {
@@ -3282,10 +2644,6 @@ footer .books li a cite {
clear: both;
}
-.clearfix {
- *zoom: 1;
-}
-
/* Print styles
========================================================================== */
@@ -3373,95 +2731,52 @@ Based on Zurb Foundation's Grid
[class*="column"] + [class*="column"].end { float: left; }
.one, .row .one { width: 8.33333%; }
-
.two, .row .two { width: 16.66667%; }
-
.three, .row .three { width: 25%; }
-
.four, .row .four { width: 33.33333%; }
-
.five, .row .five { width: 41.66667%; }
-
.six, .row .six { width: 50%; }
-
.seven, .row .seven { width: 58.33333%; }
-
.eight, .row .eight { width: 66.66667%; }
-
.nine, .row .nine { width: 75%; }
-
.ten, .row .ten { width: 83.33333%; }
-
.eleven, .row .eleven { width: 91.66667%; }
-
.twelve, .row .twelve { width: 100%; }
-.row .offset-by-one { margin-left: 8.33333%; }
-
-.row .offset-by-two { margin-left: 16.66667%; }
-
-.row .offset-by-three { margin-left: 25%; }
-
-.row .offset-by-four { margin-left: 33.33333%; }
-
-.row .offset-by-five { margin-left: 41.66667%; }
-
-.row .offset-by-six { margin-left: 50%; }
-
-.row .offset-by-seven { margin-left: 58.33333%; }
-
-.row .offset-by-eight { margin-left: 66.66667%; }
-
-.row .offset-by-nine { margin-left: 75%; }
-
-.row .offset-by-ten { margin-left: 83.33333%; }
-
.push-two { left: 16.66667%; }
-
.pull-two { right: 16.66667%; }
.push-three { left: 25%; }
-
.pull-three { right: 25%; }
.push-four { left: 33.33333%; }
-
.pull-four { right: 33.33333%; }
.push-five { left: 41.66667%; }
-
.pull-five { right: 41.66667%; }
.push-six { left: 50%; }
-
.pull-six { right: 50%; }
.push-seven { left: 58.33333%; }
-
.pull-seven { right: 58.33333%; }
.push-eight { left: 66.66667%; }
-
.pull-eight { right: 66.66667%; }
.push-nine { left: 75%; }
-
.pull-nine { right: 75%; }
.push-ten { left: 83.33333%; }
-
.pull-ten { right: 83.33333%; }
img, object, embed { max-width: 100%; height: auto; }
object, embed { height: 100%; }
-img { -ms-interpolation-mode: bicubic; }
-
#map_canvas img, .map_canvas img { max-width: none!important; }
/* Nicolas Gallagher's micro clearfix */
-.row { *zoom: 1; }
.row:before, .row:after { content: ""; display: table; }
.row:after { clear: both; }
@@ -3474,7 +2789,6 @@ img { -ms-interpolation-mode: bicubic; }
[class*="column"] + [class*="column"]:last-child { float: none; }
.column:before, .columns:before, .column:after, .columns:after { content: ""; display: table; }
.column:after, .columns:after { clear: both; }
- .offset-by-one, .offset-by-two, .offset-by-three, .offset-by-four, .offset-by-five, .offset-by-six, .offset-by-seven, .offset-by-eight, .offset-by-nine, .offset-by-ten { margin-left: 0 !important; }
.push-two, .push-three, .push-four, .push-five, .push-six, .push-seven, .push-eight, .push-nine, .push-ten { left: auto; }
.pull-two, .pull-three, .pull-four, .pull-five, .pull-six, .pull-seven, .pull-eight, .pull-nine, .pull-ten { right: auto; }
/* Mobile 4-column Grid */
@@ -3502,115 +2816,10 @@ img { -ms-interpolation-mode: bicubic; }
.pull-three-mobile { right: 75%; }
}
-
-/* Block Grids ---------------------- */
-/* These are 2-up, 3-up, 4-up and 5-up ULs, suited
-for repeating blocks of content. Add 'mobile' to
-them to switch them just like the layout grid
-(one item per line) on phones
-
-For IE7/8 compatibility block-grid items need to be
-the same height. You can optionally uncomment the
-lines below to support arbitrary height, but know
-that IE7/8 do not support :nth-child.
--------------------------------------------------- */
-.block-grid, #content .block-grid { display: block; overflow: hidden; padding: 0; }
-.block-grid > li, #content .block-grid > li { display: block; height: auto; float: left; }
-.block-grid.one-up, #content .block-grid.one-up { margin: 0; }
-.block-grid.one-up > li, #content .block-grid.one-up > li { width: 100%; padding: 0 0 15px; }
-.block-grid.two-up, #content .block-grid.two-up { margin: 0 -15px; }
-.block-grid.two-up > li, #content .block-grid.two-up > li { width: 50%; padding: 0 15px 15px; }
-.block-grid.two-up > li:nth-child(2n+1), #content .block-grid.two-up > li:nth-child(2n+1) { clear: both; }
-.block-grid.three-up, #content .block-grid.three-up { margin: 0 -12px; }
-.block-grid.three-up > li, #content .block-grid.three-up > li { width: 33.33%; padding: 0 12px 12px; }
-.block-grid.three-up > li:nth-child(3n+1), #content .block-grid.three-up > li:nth-child(3n+1) { clear: both; }
-.block-grid.four-up, #content .block-grid.four-up { margin: 0 -10px; }
-.block-grid.four-up > li, #content .block-grid.four-up > li { width: 25%; padding: 0 10px 10px; }
-.block-grid.four-up > li:nth-child(4n+1), #content .block-grid.four-up > li:nth-child(4n+1) { clear: both; }
-.block-grid.five-up, #content .block-grid.five-up { margin: 0 -8px; }
-.block-grid.five-up > li, #content .block-grid.five-up > li { width: 20%; padding: 0 8px 8px; }
-.block-grid.five-up > li:nth-child(5n+1), #content .block-grid.five-up > li:nth-child(5n+1) { clear: both; }
-
-/* Mobile Block Grids */
-@media only screen and (max-width: 767px) {
- .block-grid.mobile > li { float: none !important; width: 100% !important; margin-left: 0 !important; }
- .block-grid > li { clear: none !important; }
- .block-grid.mobile-two-up > li { width: 50% !important; }
- .block-grid.mobile-two-up > li:nth-child(2n+1) { clear: both !important; }
- .block-grid.mobile-three-up > li { width: 33.33% !important; }
- .block-grid.mobile-three-up > li:nth-child(3n+1) { clear: both !important; }
- .block-grid.mobile-four-up > li { width: 25% !important; }
- .block-grid.mobile-four-up > li:nth-child(4n+1) { clear: both; }
- .block-grid.mobile-five-up > li:nth-child(5n+1) { clear: both; }
-}
-
-/*
- ColorBox Core Style:
- The following CSS is consistent between example themes and should not be altered.
-*/
-#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
-#cboxOverlay{position:fixed; width:100%; height:100%;}
-#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
-#cboxContent{position:relative;}
-#cboxLoadedContent{overflow:auto;}
-#cboxTitle{margin:0;}
-#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
-#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
-.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none;}
-.cboxIframe{width:100%; height:100%; display:block; border:0;}
-#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box;}
-
-/*
- User Style:
- Change the following styles to modify the appearance of ColorBox. They are
- ordered & tabbed in a way that represents the nesting of the generated HTML.
-*/
-#cboxOverlay{background:url(../images/colorbox/overlay.png) repeat 0 0;}
-#cboxTopLeft{width:21px; height:21px; background:url(../images/colorbox/controls.png) no-repeat -101px 0;}
-#cboxTopRight{width:21px; height:21px; background:url(../images/colorbox/controls.png) no-repeat -130px 0;}
-#cboxBottomLeft{width:21px; height:21px; background:url(../images/colorbox/controls.png) no-repeat -101px -29px;}
-#cboxBottomRight{width:21px; height:21px; background:url(../images/colorbox/controls.png) no-repeat -130px -29px;}
-#cboxMiddleLeft{width:21px; background:url(../images/colorbox/controls.png) left top repeat-y;}
-#cboxMiddleRight{width:21px; background:url(../images/colorbox/controls.png) right top repeat-y;}
-#cboxTopCenter{height:21px; background:url(../images/colorbox/border.png) 0 0 repeat-x;}
-#cboxBottomCenter{height:21px; background:url(../images/colorbox/border.png) 0 -29px repeat-x;}
-#cboxContent{background:#fff; overflow:hidden;}
-.cboxIframe{background:#fff;}
-#cboxError{padding:50px; border:1px solid #ccc;}
-#cboxLoadedContent{margin-bottom:28px;}
-#cboxTitle{position:absolute; bottom:4px; left:0; text-align:center; width:100%; color:#949494;}
-#cboxCurrent{position:absolute; bottom:4px; left:58px; color:#949494;}
-#cboxSlideshow{position:absolute; bottom:4px; right:30px; color:#0092ef;}
-#cboxPrevious{position:absolute; bottom:0; left:0; background:url(../images/colorbox/controls.png) no-repeat -75px 0; width:25px; height:25px; text-indent:-9999px;}
-#cboxPrevious:hover{background-position:-75px -25px;}
-#cboxNext{position:absolute; bottom:0; left:27px; background:url(../images/colorbox/controls.png) no-repeat -50px 0; width:25px; height:25px; text-indent:-9999px;}
-#cboxNext:hover{background-position:-50px -25px;}
-#cboxLoadingOverlay{background:url(../images/colorbox/loading_background.png) no-repeat center center;}
-#cboxLoadingGraphic{background:url(../images/colorbox/loading.gif) no-repeat center center;}
-#cboxClose{position:absolute; bottom:0; right:0; background:url(../images/colorbox/controls.png) no-repeat -25px 0; width:25px; height:25px; text-indent:-9999px;}
-#cboxClose:hover{background-position:-25px -25px;}
-
-/*
- The following fixes a problem where IE7 and IE8 replace a PNG's alpha transparency with a black fill
- when an alpha filter (opacity change) is set on the element or ancestor element. This style is not applied to or needed in IE9.
- See: http://jacklmoore.com/notes/ie-transparency-problems/
-*/
-.cboxIE #cboxTopLeft,
-.cboxIE #cboxTopCenter,
-.cboxIE #cboxTopRight,
-.cboxIE #cboxBottomLeft,
-.cboxIE #cboxBottomCenter,
-.cboxIE #cboxBottomRight,
-.cboxIE #cboxMiddleLeft,
-.cboxIE #cboxMiddleRight {
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF);
-}
-
-
/* Syntax Highlighting ---------------------- */
pre, code {
- font-family: "source-code-pro", Consolas, monospace !important;
+ font-family: Consolas, Menlo, monospace !important;
word-spacing: 0;
}
pre code {
@@ -3619,120 +2828,165 @@ pre code {
background: #f8f8ff
}
-pre .comment,
-pre .template_comment,
-pre .diff .header,
-pre .javadoc {
- color: #998;
- font-style: italic
-}
+/*
+ * Styles for highlight.js. Classes without the hljs prefix are legacy
+ * and can be removed once all pages update grunt-jquery-content to
+ * the latest version.
+ */
-pre .keyword,
-pre .css .rule .keyword,
-pre .winutils,
-pre .javascript .title,
-pre .nginx .title,
-pre .subst,
-pre .request,
-pre .status {
- color: #333;
- font-weight: bold
+pre .comment, /* legacy */
+pre .hljs-comment,
+pre .template_comment, /* legacy */
+pre .diff .header, /* legacy */
+pre .diff .hljs-meta,
+pre .javadoc, /* legacy */
+pre .hljs-doctag {
+ color: #998;
+ font-style: italic
+}
+
+pre .keyword, /* legacy */
+pre .hljs-keyword,
+pre .css .rule .keyword, /* legacy */
+pre .css .hljs-keyword,
+pre .winutils, /* ??? */
+pre .javascript .title, /* legacy */
+pre .javascript .hljs-name,
+pre .nginx .title, /* legacy */
+pre .nginx .hljs-name,
+pre .subst, /* legacy */
+pre .hljs-subst,
+pre .request, /* ??? */
+pre .status /* ??? */ {
+ color: #333;
+ font-weight: bold
}
-pre .number,
-pre .hexcolor,
-pre .ruby .constant {
- color: #099;
+pre .number, /* legacy */
+pre .hexcolor, /* legacy */
+pre .hljs-number,
+pre .ruby .constant /* legacy */ {
+ color: #099;
}
-pre .string,
-pre .tag .value,
-pre .phpdoc,
-pre .tex .formula {
- color: #d14
+pre .string, /* legacy */
+pre .tag .value, /* legacy */
+pre .hljs-string,
+pre .phpdoc, /* legacy */
+pre .tex .formula /* legacy */ {
+ color: #d14
}
-pre .title,
-pre .id {
- color: #900;
- font-weight: bold
+pre .hljs-name,
+pre .id, /* legacy */
+pre .hljs-selector-id {
+ color: #900;
+ font-weight: bold
}
-pre .javascript .title,
-pre .lisp .title,
-pre .clojure .title,
-pre .subst {
- font-weight: normal
+pre .javascript .title, /* legacy */
+pre .javascript .hljs-name,
+pre .lisp .title, /* legacy */
+pre .lisp .hljs-name,
+pre .clojure .title, /* legacy */
+pre .clojure .hljs-name,
+pre .subst, /* legacy */
+pre .hljs-subst {
+ font-weight: normal
}
-pre .class .title,
+pre .class .title, /* legacy */
+pre .hljs-selector-class .hljs-name,
pre .haskell .type,
-pre .vhdl .literal,
-pre .tex .command {
- color: #458;
- font-weight: bold
-}
-
-pre .tag,
-pre .tag .title,
-pre .rules .property,
-pre .django .tag .keyword {
- color: #000080;
- font-weight: normal
-}
-
-pre .attribute,
-pre .variable,
-pre .lisp .body {
- color: #008080
-}
-
-pre .regexp {
- color: #009926
-}
-
-pre .class {
- color: #458;
- font-weight: bold
-}
-
-pre .symbol,
-pre .ruby .symbol .string,
-pre .lisp .keyword,
-pre .tex .special,
-pre .prompt {
- color: #990073
-}
-
-pre .built_in,
-pre .lisp .title,
-pre .clojure .built_in {
- color: #0086b3
-}
-
-pre .preprocessor,
-pre .pi,
-pre .doctype,
-pre .shebang,
-pre .cdata {
- color: #999;
- font-weight: bold
+pre .haskell .hljs-type,
+pre .vhdl .literal, /* legacy */
+pre .vhdl .hljs-string,
+pre .tex .command, /* legacy */
+pre .tex .hljs-keyword {
+ color: #458;
+ font-weight: bold
+}
+
+pre .tag, /* legacy */
+pre .hljs-tag,
+pre .tag .title, /* legacy */
+pre .hljs-tag .hljs-name,
+pre .rules .property, /* ??? */
+pre .django .tag .keyword, /* legacy */
+pre .django .hljs-tag .hljs-keyword {
+ color: #000080;
+ font-weight: normal
+}
+
+pre .attribute, /* legacy */
+pre .hljs-attribute,
+pre .hljs-attr,
+pre .variable, /* legacy */
+pre .hljs-variable,
+pre .lisp .body, /* legacy */
+pre .lisp .hljs-symbol {
+ color: #008080
+}
+
+pre .regexp, /* legacy */
+pre .hljs-regexp {
+ color: #009926
+}
+
+pre .class, /* legacy */
+pre .hljs-selector-class {
+ color: #458;
+ font-weight: bold
+}
+
+pre .symbol, /* legacy */
+pre .hljs-symbol,
+pre .ruby .symbol .string, /* legacy */
+pre .ruby .hljs-symbol .hljs-string,
+pre .lisp .keyword, /* legacy */
+pre .lisp .hljs-keyword,
+pre .tex .special, /* legacy */
+pre .prompt /* legacy */ {
+ color: #990073
+}
+
+pre .built_in, /* legacy */
+pre .hljs-built_in,
+pre .lisp .title, /* legacy */
+pre .lisp .hljs-name,
+pre .clojure .built_in, /* legacy */
+pre .clojure .hljs-built_in {
+ color: #0086b3
+}
+
+pre .preprocessor, /* legacy */
+pre .pi, /* legacy */
+pre .doctype, /* legacy */
+pre .shebang, /* legacy */
+pre .cdata, /* legacy */
+pre .hljs-meta {
+ color: #999;
+ font-weight: bold
}
-pre .deletion {
- background: #fdd
+pre .deletion, /* legacy */
+pre .hljs-deletion {
+ background: #fdd
}
-pre .addition {
- background: #dfd
+pre .addition, /* legacy */
+pre .hljs-addition {
+ background: #dfd
}
-pre .diff .change {
- background: #0086b3
+pre .diff .change, /* legacy */
+pre .diff .hljs-meta {
+ background: #0086b3
}
-pre .chunk {
- color: #aaa
+pre .chunk, /* legacy */
+pre .diff .hljs-comment {
+ color: #aaa
}
.syntaxhighlighter a,
@@ -3764,7 +3018,7 @@ pre .chunk {
vertical-align: baseline !important;
width: auto !important;
box-sizing: content-box !important;
- font-family: "source-code-pro", Consolas, monospace !important;
+ font-family: Consolas, Menlo, monospace !important;
font-weight: normal !important;
font-style: normal !important;
font-size: 1em !important;
@@ -3814,6 +3068,7 @@ pre .chunk {
.syntaxhighlighter table td.gutter .line {
text-align: right !important;
padding: 0 0.5em 0 1em !important;
+ user-select: none;
}
.syntaxhighlighter table td.code .line {
padding: 0 0.5em !important;
diff --git a/themes/jquery/css/blog.css b/themes/jquery/css/blog.css
new file mode 100644
index 00000000..a3d93c5f
--- /dev/null
+++ b/themes/jquery/css/blog.css
@@ -0,0 +1,140 @@
+/* Blog comments */
+
+#comments-title,
+#content h2#comments-title {
+ margin-top: 2.6em;
+ text-transform: uppercase;
+}
+.nopassword,
+.nocomments {
+ font-size: 24px;
+ font-weight: 100;
+ margin: 26px 0;
+}
+.commentlist {
+ list-style: none;
+ margin: 0 auto;
+}
+.content .commentlist {
+ width: 100%; /* reset the width for the one-column layout */
+}
+#comments .commentlist > li.comment {
+ background: #f6f6f6;
+ border: 1px solid #ddd;
+ border-radius: 3px;
+ margin: 0 0 1em 60px;
+ padding: 5px 12px 0;
+ position: relative;
+ word-wrap: break-word;
+}
+#comments .commentlist > li.pingback {
+ margin: 0 0 1em 60px;
+ padding: 0;
+}
+.comment-meta .fn {
+ font-style: normal;
+ font-weight: bold;
+}
+.comment-meta {
+ color: #666;
+ font-size: 12px;
+ line-height: 2.2em;
+}
+#comments .commentlist > li.bypostauthor {
+ border-color: #0769ad; /* jQuery Primary Blue */
+}
+.jquery-ui #comments .commentlist > li.bypostauthor {
+ border-color: #b24926; /* jQuery UI Secondary Orange */
+}
+.jquery-mobile #comments .commentlist > li.bypostauthor {
+ border-color: #108040; /* jQuery Mobile Secondary Green */
+}
+#comments .commentlist > li.bypostauthor .comment-meta {
+ background: #ddd;
+ border-radius: 3px 3px 0 0;
+ color: inherit;
+ margin: -5px -12px 5px -12px;
+ padding: 5px 12px;
+}
+.commentlist .avatar {
+ border-radius: 3px;
+ box-shadow: 0 1px 2px #ccc;
+ left: -82px;
+ padding: 0;
+ position: absolute;
+ top: 0;
+ width: 68px;
+ max-height: 68px;
+}
+a.comment-reply-link {
+ background: #eee;
+ border-radius: 3px;
+ color: #666;
+ display: inline-block;
+ font-size: 12px;
+ padding: 0 8px;
+ text-decoration: none;
+}
+a.comment-reply-link:hover,
+a.comment-reply-link:focus,
+a.comment-reply-link:active {
+ background: #888;
+ color: #fff;
+}
+a.comment-reply-link > span {
+ display: inline-block;
+ position: relative;
+ top: -1px;
+}
+
+/* Blog comment form */
+
+#respond {
+ background: #f6f6f6;
+ border: 1px solid #ddd;
+ border-radius: 3px;
+ margin: 0 0 1.625em;
+ padding: 1.625em;
+}
+#respond form {
+ padding: 0;
+}
+#respond p {
+ margin: 10px 0;
+}
+#respond .comment-notes,
+#respond .logged-in-as,
+#respond label {
+ font-size: 12px;
+}
+#respond label {
+ line-height: 2.2em;
+}
+#respond .comment-form-comment label {
+ display: block;
+}
+#respond .required {
+ color: #bd3500;
+ font-weight: bold;
+}
+#respond input[type="text"],
+#respond textarea {
+ background: #fff;
+ border-radius: 5px;
+ padding: 10px;
+}
+#respond textarea {
+ resize: vertical;
+ width: 95%;
+}
+#respond input[type=text] {
+ display: block;
+ height: 24px;
+ width: 75%;
+}
+#respond .form-submit {
+ text-align: right;
+}
+#respond input[type=submit] {
+ float: none;
+}
diff --git a/themes/jquery/css/font-awesome-ie7.min.css b/themes/jquery/css/font-awesome-ie7.min.css
deleted file mode 100755
index ae301609..00000000
--- a/themes/jquery/css/font-awesome-ie7.min.css
+++ /dev/null
@@ -1,22 +0,0 @@
-/*!
- * Font Awesome 3.0.2
- * the iconic font designed for use with Twitter Bootstrap
- * -------------------------------------------------------
- * The full suite of pictographic icons, examples, and documentation
- * can be found at: http://fortawesome.github.com/Font-Awesome/
- *
- * License
- * -------------------------------------------------------
- * - The Font Awesome font is licensed under the SIL Open Font License - http://scripts.sil.org/OFL
- * - Font Awesome CSS, LESS, and SASS files are licensed under the MIT License -
- * http://opensource.org/licenses/mit-license.html
- * - The Font Awesome pictograms are licensed under the CC BY 3.0 License - http://creativecommons.org/licenses/by/3.0/
- * - Attribution is no longer required in Font Awesome 3.0, but much appreciated:
- * "Font Awesome by Dave Gandy - http://fortawesome.github.com/Font-Awesome"
-
- * Contact
- * -------------------------------------------------------
- * Email: dave@davegandy.com
- * Twitter: http://twitter.com/fortaweso_me
- * Work: Lead Product Designer @ http://kyruus.com
- */.icon-large{font-size:1.3333333333333333em;margin-top:-4px;padding-top:3px;margin-bottom:-4px;padding-bottom:3px;vertical-align:middle}.nav [class^="icon-"],.nav [class*=" icon-"]{vertical-align:inherit;margin-top:-4px;padding-top:3px;margin-bottom:-4px;padding-bottom:3px}.nav [class^="icon-"].icon-large,.nav [class*=" icon-"].icon-large{vertical-align:-25%}.nav-pills [class^="icon-"].icon-large,.nav-tabs [class^="icon-"].icon-large,.nav-pills [class*=" icon-"].icon-large,.nav-tabs [class*=" icon-"].icon-large{line-height:.75em;margin-top:-7px;padding-top:5px;margin-bottom:-5px;padding-bottom:4px}.btn [class^="icon-"].pull-left,.btn [class*=" icon-"].pull-left,.btn [class^="icon-"].pull-right,.btn [class*=" icon-"].pull-right{vertical-align:inherit}.btn [class^="icon-"].icon-large,.btn [class*=" icon-"].icon-large{margin-top:-0.5em}a [class^="icon-"],a [class*=" icon-"]{cursor:pointer}ul.icons{text-indent:-1.5em;margin-left:3em}.icon-glass{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-music{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-search{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-envelope{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-heart{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-star{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-star-empty{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-user{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-film{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-th-large{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-th{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-th-list{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-ok{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-remove{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-zoom-in{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-zoom-out{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-off{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-signal{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-cog{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-trash{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-home{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-file{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-time{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-road{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-download-alt{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-download{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-upload{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-inbox{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-play-circle{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-repeat{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-refresh{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-list-alt{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-lock{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-flag{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-headphones{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-volume-off{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-volume-down{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-volume-up{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-qrcode{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-barcode{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-tag{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-tags{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-book{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-bookmark{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-print{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-camera{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-font{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-bold{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-italic{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-text-height{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-text-width{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-align-left{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-align-center{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-align-right{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-align-justify{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-list{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-indent-left{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-indent-right{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-facetime-video{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-picture{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-pencil{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-map-marker{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-adjust{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-tint{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-edit{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-share{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-check{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-move{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-step-backward{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-fast-backward{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-backward{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-play{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-pause{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-stop{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-forward{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-fast-forward{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-step-forward{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-eject{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-chevron-left{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-chevron-right{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-plus-sign{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-minus-sign{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-remove-sign{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-ok-sign{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-question-sign{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-info-sign{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-screenshot{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-remove-circle{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-ok-circle{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-ban-circle{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-arrow-left{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-arrow-right{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-arrow-up{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-arrow-down{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-share-alt{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-resize-full{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-resize-small{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-plus{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-minus{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-asterisk{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-exclamation-sign{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-gift{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-leaf{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-fire{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-eye-open{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-eye-close{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-warning-sign{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-plane{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-calendar{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-random{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-comment{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-magnet{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-chevron-up{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-chevron-down{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-retweet{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-shopping-cart{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-folder-close{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-folder-open{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-resize-vertical{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-resize-horizontal{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-bar-chart{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-twitter-sign{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-facebook-sign{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-camera-retro{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-key{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-cogs{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-comments{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-thumbs-up{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-thumbs-down{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-star-half{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-heart-empty{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-signout{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-linkedin-sign{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-pushpin{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-external-link{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-signin{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-trophy{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-github-sign{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-upload-alt{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-lemon{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-phone{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-check-empty{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-bookmark-empty{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-phone-sign{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-twitter{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-facebook{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-github{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-unlock{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-credit-card{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-rss{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-hdd{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-bullhorn{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-bell{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-certificate{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-hand-right{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-hand-left{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-hand-up{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-hand-down{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-circle-arrow-left{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-circle-arrow-right{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-circle-arrow-up{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-circle-arrow-down{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-globe{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-wrench{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-tasks{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-filter{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-briefcase{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-fullscreen{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-group{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-link{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-cloud{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-beaker{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-cut{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-copy{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-paper-clip{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-save{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-sign-blank{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-reorder{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-list-ul{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-list-ol{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-strikethrough{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-underline{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-table{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-magic{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-truck{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-pinterest{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-pinterest-sign{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-google-plus-sign{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-google-plus{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-money{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-caret-down{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-caret-up{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-caret-left{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-caret-right{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-columns{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-sort{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-sort-down{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-sort-up{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-envelope-alt{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-linkedin{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-undo{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-legal{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-dashboard{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-comment-alt{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-comments-alt{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-bolt{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-sitemap{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-umbrella{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-paste{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-lightbulb{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-exchange{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-cloud-download{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-cloud-upload{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-user-md{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-stethoscope{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-suitcase{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-bell-alt{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-coffee{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-food{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-file-alt{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-building{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-hospital{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-ambulance{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-medkit{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-fighter-jet{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-beer{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-h-sign{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-plus-sign-alt{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-double-angle-left{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-double-angle-right{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-double-angle-up{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-double-angle-down{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-angle-left{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-angle-right{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-angle-up{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-angle-down{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-desktop{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-laptop{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-tablet{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-mobile-phone{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-circle-blank{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-quote-left{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-quote-right{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-spinner{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-circle{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-reply{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-github-alt{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-folder-close-alt{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}.icon-folder-open-alt{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = '')}
\ No newline at end of file
diff --git a/themes/jquery/css/fonts/FontAwesome.otf b/themes/jquery/css/fonts/FontAwesome.otf
deleted file mode 100755
index 64049bf2..00000000
Binary files a/themes/jquery/css/fonts/FontAwesome.otf and /dev/null differ
diff --git a/themes/jquery/css/fonts/fontawesome-webfont.eot b/themes/jquery/css/fonts/fontawesome-webfont.eot
deleted file mode 100755
index 7d81019e..00000000
Binary files a/themes/jquery/css/fonts/fontawesome-webfont.eot and /dev/null differ
diff --git a/themes/jquery/css/fonts/fontawesome-webfont.svg b/themes/jquery/css/fonts/fontawesome-webfont.svg
deleted file mode 100755
index ba0afe5e..00000000
--- a/themes/jquery/css/fonts/fontawesome-webfont.svg
+++ /dev/null
@@ -1,284 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/themes/jquery/css/sri-modal.css b/themes/jquery/css/sri-modal.css
new file mode 100644
index 00000000..2b9f5dcf
--- /dev/null
+++ b/themes/jquery/css/sri-modal.css
@@ -0,0 +1,99 @@
+/*
+ * Added for SRI Modal
+ */
+.sri-modal {
+ padding: 20px;
+ border: none;
+ background: #fff;
+ border-radius: 0;
+
+ /* Resize with window */
+ width: calc(100% - 40px) !important;
+ max-width: 830px;
+ left: 50% !important;
+ transform: translateX(-50%);
+}
+
+.sri-modal .ui-dialog-titlebar {
+ padding: 0;
+ border: none;
+ background: #fff;
+ color: #000;
+ cursor: auto;
+}
+
+.sri-modal .ui-dialog-title {
+ text-align: center;
+ font-family: Cairo, "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
+ font-weight: 400;
+ width: 100%;
+}
+
+.sri-modal .ui-dialog-titlebar-close {
+ background: none;
+ border: none;
+ right: 28px;
+}
+
+.sri-modal .ui-icon-closethick,
+.sri-modal .ui-button:hover .ui-icon-closethick,
+.sri-modal .ui-button:active .ui-icon-closethick {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAclBMVEUAAADMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxg1ZvWAAAAJXRSTlMAAQIDBAUGCQsNDhQWGSg4g4uUoKOoq62vsLW8wMrO2tzk5ujxm/5xbwAAAGxJREFUGBmNwVcWgkAQRcFHg4FgzjomZu7+t+hpRv6p0iS7byPJTs+5BluIjewML5O7A3F1AdJMrgpkqVVWBVxqNVriNhrZDRdrZXYl62sNjkBaB6Cv5PaQOpUB3iZXHFInqXx8FvozDQpN8gNoXAtiMhPWmQAAAABJRU5ErkJggg==) 0 0;
+}
+
+.sri-modal .ui-dialog-content {
+ padding: 30px 0 0 0;
+}
+
+.sri-modal .ui-dialog-content a {
+ color: #b24926;
+}
+
+.sri-modal-link {
+ width: 100%;
+ word-wrap: break-word;
+ word-break: break-all;
+ display: inline-block;
+ background-color: #f8fbfb;
+ /* Leave room for button */
+ padding: 10px 45px 10px 10px;
+ position: relative;
+}
+
+.sri-modal-link code {
+ display: inline-block;
+ white-space: pre-line;
+ background-color: transparent;
+ font-size: 13px;
+ line-height: 16px;
+ padding: 0;
+}
+
+.sri-modal-copy-btn {
+ background-color: #1c6db3;
+ border: none;
+ font-size: 1rem;
+ width: 35px;
+ height: 35px;
+ cursor: pointer;
+ position: absolute;
+ top: 5px;
+ right: 0;
+}
+
+.sri-modal-copy-btn > i {
+ color: #fff;
+}
+
+.sri-modal-info {
+ padding: 15px;
+ font: 15px/22px "Helvetica Neue", HelveticaNeue, Helvetica, Arial, sans-serif;
+}
+
+#sri-modal-template {
+ display: none;
+}
+
+.sri-modal .ui-tooltip {
+ box-shadow: 0 0 5px #aaa;
+}
diff --git a/themes/jquery/footer-bottom.php b/themes/jquery/footer-bottom.php
index 746e5da5..2fc46f6f 100644
--- a/themes/jquery/footer-bottom.php
+++ b/themes/jquery/footer-bottom.php
@@ -1,60 +1,34 @@
array(
- 'icon' => 'pencil',
- 'url' => 'http://learn.jquery.com/'
- ),
- 'Forum' => array(
- 'icon' => 'group',
- 'url' => 'http://forum.jquery.com/',
+ 'class' => 'icon-pencil',
+ 'url' => 'https://learn.jquery.com/'
),
- 'API' => array(
- 'icon' => 'wrench',
- 'url' => 'http://api.' . $project . '.com/'
+ 'Chat' => array(
+ 'class' => 'icon-comments',
+ 'url' => 'https://jquery.com/support/'
),
'Twitter' => array(
- 'icon' => 'twitter',
- 'url' => 'https://twitter.com/jquery'
- ),
- 'IRC' => array(
- 'icon' => 'comments',
- 'url' => 'http://irc.jquery.org/'
+ 'class' => 'icon-twitter',
+ 'url' => get_option( 'jquery_twitter_link' ) ?: 'https://twitter.com/jquery'
),
'GitHub' => array(
- 'icon' => 'github',
+ 'class' => 'icon-github',
'url' => 'https://github.com/jquery'
)
);
-
- switch ( $project ) {
- case 'jqueryui':
- $links[ 'Forum' ][ 'url' ] = 'http://forum.jquery.com/using-jquery-ui/';
- $links[ 'Twitter' ][ 'url' ] = 'https://twitter.com/jqueryui';
- break;
- case 'jquerymobile':
- $links[ 'Forum' ][ 'url' ] = 'http://forum.jquery.com/jquery-mobile/';
- $links[ 'Twitter' ][ 'url' ] = 'https://twitter.com/jquerymobile';
- break;
- case 'qunitjs':
- $links[ 'Forum' ][ 'url' ] = 'http://forum.jquery.com/qunit-and-testing/';
- $links[ 'Twitter' ][ 'url' ] = 'https://twitter.com/qunitjs';
- break;
- }
?>
-
-
-
-
-
-