diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 00000000..b7ca95b5
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,5 @@
+# Auto detect text files and perform LF normalization
+* text=auto
+
+# JS files must always use LF for tools to work
+*.js eol=lf
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 a9edc003..1bcabeb5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,17 +1,4 @@
-gw-resources/*
-blogs.dir/*
-# Mac OS X Files
-.DS_Store
-# Thumbnails
-._*
-# Files that might appear on external disk
-.Spotlight-V100
-.Trashes
-
-
-# Windows Files
-# image file caches
-Thumbs.db
-# Folder config file
-Desktop.ini
-jQuery Themes.esproj
+/gw-resources/*
+/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
new file mode 100644
index 00000000..089b211a
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,22 @@
+# Contributing
+
+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 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/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 00000000..7d5393a1
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,278 @@
+ 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.
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 7d5a676d..9de076af 100644
--- a/README.md
+++ b/README.md
@@ -1,130 +1,22 @@
-# jQuery.com jquery-wp-content
+# jquery-wp-content
-This is a set of plugins, themes, and configuration files for jQuery's website infrastructure, which is powered by WordPress. It is designed as a custom content directory. So think of `jquery-wp-content` as your `wp-content` directory.
+This repository provisions the `wp-content` directory of a WordPress installation, with the themes, plugins, and site options for jQuery Project websites.
-## Prerequisites
+## Getting started
-This install guide assumes you already have certain prerequisites already configured within your environment.
+### Production
-* Apache
-* Mysql
-* PHP
+To learn how the sites are managed in production, refer to
+.
-## Installation
+### Staging
-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:
+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
- ```
-
- ServerName local.jquery.com
- ServerAlias *.jquery.com *.jqueryui.com *.jquery.org *.qunitjs.com *.sizzlejs.com *.jquerymobile.com
- DocumentRoot "/srv/www/jquery"
-
- Options All
- AllowOverride All
- Order allow,deny
- Allow from all
-
-
- ```
+## Local
- 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.
-
- You do not need to configure your `/etc/hosts` file for `local.*` because `jquery.com`'s DNS handles this for you.
-
-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 http://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. 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. 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.
-
-## Auto-Updates
-Changes pushed to master will be pulled onto the stage domain.
-
-## Copyright
-
-Copyright 2013 jQuery Foundation and other contributors. All rights reserved.
-
-The `jquery-wp-content` repository contains themes for rendering all jQuery Foundation web sites.
-
-### What is licensed
-
-The contents of the web sites that run on top of `jquery-wp-content` are all available under the terms of the MIT license ( http://jquery.org/license ).
-
-Special exception: Code samples are given away for you to freely use, for any purpose. For code samples in API sites
-and Learn articles (unlike the source code of jQuery projects) you don't even have to say where you got the code from.
-Just use it.
-
-The PHP files in the `jquery-wp-content` repository are a derivative work of WordPress, and available under the
-terms of the GPL license ( http://codex.wordpress.org/License ).
-
-### What is not licensed
-
-The design, layout, and look-and-feel of the `jquery-wp-content` repository, including all CSS, images, and
-icons, are copyright jQuery Foundation, Inc. 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. `jquery-wp-content` contains CSS, images, and icons that are copyrighted by other individuals; those items are licensed under their original terms.
-
-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 websites.
+To help preview or debug changes locally during development,
+you can use .
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 f968b0f1..00000000
--- a/config.php
+++ /dev/null
@@ -1,93 +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 d4bcd362..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() )
- 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/jquery-filters.php b/mu-plugins/jquery-filters.php
deleted file mode 100644
index 45a7e5d9..00000000
--- a/mu-plugins/jquery-filters.php
+++ /dev/null
@@ -1,81 +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;
-});
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 4fb5d15f..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/jqueryui.com/jquery-filters.php b/mu-plugins/jqueryui.com/jquery-filters.php
deleted file mode 100644
index a59dd8c9..00000000
--- a/mu-plugins/jqueryui.com/jquery-filters.php
+++ /dev/null
@@ -1,48 +0,0 @@
-');
- if ( $demoPos === false ) {
- return $content;
- }
-
- $plugin = $post->post_name;
- $demoList = json_decode( file_get_contents( GW_RESOURCE_DIR . '/demos/demo-list.json' ) );
- $demos = $demoList->$plugin;
- $defaultDemo = $demos[ 0 ];
-
- $demoContent .=
- '
\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 67195f5a..00000000
--- a/package.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "version": "2.4.19"
-}
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 90272bfc..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 203933c7..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 98%
rename from themes/jquery/license.txt
rename to plugins/disable-emojis/license.txt
index d31195ab..5fbe4a70
--- a/themes/jquery/license.txt
+++ b/plugins/disable-emojis/license.txt
@@ -1,281 +1,281 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin St, Fifth Floor, Boston, MA 02110, 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 Library 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
-
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin St, Fifth Floor, Boston, MA 02110, 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 Library 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
+
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/grunt-wordpress.php b/plugins/gilded-wordpress/gilded-wordpress.php
similarity index 94%
rename from mu-plugins/grunt-wordpress.php
rename to plugins/gilded-wordpress/gilded-wordpress.php
index bdff0546..7a8ba247 100644
--- a/mu-plugins/grunt-wordpress.php
+++ b/plugins/gilded-wordpress/gilded-wordpress.php
@@ -1,14 +1,17 @@
\ 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
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:
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
+ would be a good place to start.
+
+
This site provides API documentation for jQuery Mobile
+
+
+
+
This site provides API documentation for 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
+ to find out more about upgrading.
+
+
+
+
To get started, use the search at the top of the page, view the
+ ">full listing of entries, or browse by
+ category from the sidebar.
+
+
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.
+
+
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 f82970d1..4f2e6c6e 100644
--- a/themes/api.jqueryui.com/functions.php
+++ b/themes/api.jqueryui.com/functions.php
@@ -1,11 +1,15 @@
"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",
);
}
@@ -20,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/i/favicon.ico b/themes/api.jqueryui.com/i/favicon.ico
index 77e3bd2d..d6c4de29 100755
Binary files a/themes/api.jqueryui.com/i/favicon.ico and b/themes/api.jqueryui.com/i/favicon.ico differ
diff --git a/themes/api.jqueryui.com/index.php b/themes/api.jqueryui.com/index.php
index ffdc74e5..f72eaddb 100644
--- a/themes/api.jqueryui.com/index.php
+++ b/themes/api.jqueryui.com/index.php
@@ -18,40 +18,39 @@
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 1.10. If
- you're working with jQuery UI 1.9, you can find the API documentation
- on api.jqueryui.com/1.9/.
- However, we would encourage you to upgrade to jQuery UI 1.10 in order
+
This site provides API documentation for jQuery UI . If
+ you're working with an older version, you can find the API documentation
+ at the links below.
+ 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
- release announcement
- and upgrade guide
- to find out more about jQuery UI 1.10.
+ upgrade guide
+ to find out more about jQuery UI .