Compare commits

...

127 Commits

Author SHA1 Message Date
Pascal Birchler
7dd41ffed9 Tag 4.2.14
Built from https://develop.svn.wordpress.org/tags/4.2.14@40503


git-svn-id: http://core.svn.wordpress.org/tags/4.2.14@40379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-20 18:51:31 +00:00
Pascal Birchler
5565b98dde Bump 4.2 branch to version 4.2.14.
Built from https://develop.svn.wordpress.org/branches/4.2@40492


git-svn-id: http://core.svn.wordpress.org/branches/4.2@40368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-20 16:26:30 +00:00
Pascal Birchler
82c9b36ce7 Fix broken audio/video functions when sanitizing ID3 data
This fixes a bug where running `wp_kses_post_deep()` on all the ID3
tag data corrupted blob data.

See #40075, #40085.

Merges [40400] to the 4.2 branch.

Built from https://develop.svn.wordpress.org/branches/4.2@40465


git-svn-id: http://core.svn.wordpress.org/branches/4.2@40341 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-17 13:22:30 +00:00
James Nylen
b9a98e7562 Bump 4.2 branch to version 4.2.13.
Built from https://develop.svn.wordpress.org/branches/4.2@40207


git-svn-id: http://core.svn.wordpress.org/branches/4.2@40146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-06 16:32:30 +00:00
John Blackbourn
8299a48476 Press This: Verify intent before fetching in-page resources using Press This.
Props vortfu

Merges [40195] to the 4.2 branch.

Built from https://develop.svn.wordpress.org/branches/4.2@40201


git-svn-id: http://core.svn.wordpress.org/branches/4.2@40140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-06 14:04:31 +00:00
Aaron Campbell
db266e95e1 Strip control characters before validating redirect.
Merges [40183] to 4.2 branch.

Built from https://develop.svn.wordpress.org/branches/4.2@40189


git-svn-id: http://core.svn.wordpress.org/branches/4.2@40128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-06 13:44:24 +00:00
Aaron Campbell
2bc231688e Plugins: Add file check to plugin deletions.
Merges [40169] to 4.2 branch.


Built from https://develop.svn.wordpress.org/branches/4.2@40175


git-svn-id: http://core.svn.wordpress.org/branches/4.2@40114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-06 13:03:30 +00:00
Dominik Schilling
462631b8cc Embeds: URL encode YouTube video IDs for broader compatibility.
Merge of [40160] to the 4.2 branch.

Built from https://develop.svn.wordpress.org/branches/4.2@40166


git-svn-id: http://core.svn.wordpress.org/branches/4.2@40105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-06 12:07:35 +00:00
Jeremy Felt
933f556e84 Validate video and audio metadata.
Merge of [40148] to the 4.2 branch.

Built from https://develop.svn.wordpress.org/branches/4.2@40154


git-svn-id: http://core.svn.wordpress.org/branches/4.2@40093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-06 08:09:31 +00:00
Aaron Campbell
f449b0a0ce Bump 4.2 branch to version 4.2.12.
Built from https://develop.svn.wordpress.org/branches/4.2@40001


git-svn-id: http://core.svn.wordpress.org/branches/4.2@39938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-26 18:25:29 +00:00
John Blackbourn
22688ca8c6 Posts, Post Types: When using Excerpt mode on the Posts list table, ensure the excerpt output matches what was manually entered into the Excerpt field.
Merges [39956] to the 4.2 branch.

Built from https://develop.svn.wordpress.org/branches/4.2@39984


git-svn-id: http://core.svn.wordpress.org/branches/4.2@39921 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-26 14:17:17 +00:00
Dominik Schilling
afc91088f4 Press This: Do not show Categories & Tags UI for users who cannot assign terms to posts anyways.
Merge of [39968] to the 4.2 branch.
Built from https://develop.svn.wordpress.org/branches/4.2@39975


git-svn-id: http://core.svn.wordpress.org/branches/4.2@39912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-26 14:13:31 +00:00
Dominik Schilling
b7509648b8 Query: Ensure that queries work correctly with post type names with special characters.
Merge of [39952] to the 4.2 branch.
Built from https://develop.svn.wordpress.org/branches/4.2@39961


git-svn-id: http://core.svn.wordpress.org/branches/4.2@39898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-26 13:52:00 +00:00
Aaron Campbell
ab64033700 Bump 4.2 branch to version 4.2.11.
Built from https://develop.svn.wordpress.org/branches/4.2@39865


git-svn-id: http://core.svn.wordpress.org/branches/4.2@39802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 16:58:29 +00:00
Joe McGill
073c7e6092 Media: Fix exif_imagetype check in wp_get_image_mime
This is a follow up to [39831].

Merges [39850] to the 4.2 branch.

Built from https://develop.svn.wordpress.org/branches/4.2@39856


git-svn-id: http://core.svn.wordpress.org/branches/4.2@39793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 16:43:32 +00:00
Joe McGill
99f9d45c10 Media: Improve image filetype checking.
This adds a new function `wp_get_image_mime()` which is used by
`wp_check_filetype_and_ext()` to validate image files using
`exif_imagetype()` if available instead of `getimagesize()`.

`getimagesize()` is less performant than `exif_imagetype()` and is
dependent on GD. If `exif_imagetype()` is not available, it falls back to
`getimagesize()` as before.

If `wp_check_filetype_and_ext()` can't validate the filetype, we now return
`false` for ext/MIME values.

Merges [39831] to the 4.2 branch.

Built from https://develop.svn.wordpress.org/branches/4.2@39837


git-svn-id: http://core.svn.wordpress.org/branches/4.2@39775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 13:18:29 +00:00
Dominik Schilling
87912afcf6 Updates: Translate plugin data on the Updates screen.
Merge of [39808] to the 4.2 branch.
Built from https://develop.svn.wordpress.org/branches/4.2@39825


git-svn-id: http://core.svn.wordpress.org/branches/4.2@39763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 11:42:26 +00:00
Dominik Schilling
76d93255d6 Themes: Fix markup for theme name fallbacks.
Merge of [39807] to the 4.2 branch.
Built from https://develop.svn.wordpress.org/branches/4.2@39814


git-svn-id: http://core.svn.wordpress.org/branches/4.2@39752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 11:11:56 +00:00
Jeremy Felt
ed1586d7ff Multisite: Use wp_rand() in signup key creation.
Merges [39795] to the 4.2 branch.

Built from https://develop.svn.wordpress.org/branches/4.2@39801


git-svn-id: http://core.svn.wordpress.org/branches/4.2@39739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 05:34:56 +00:00
Dion Hulse
4873f1b139 Update PHPMailer to 5.2.22.
The full list of changes is available here:
https://github.com/PHPMailer/PHPMailer/compare/v5.2.21...v5.2.22

Merges [39759] to the 4.2 branch.
Fixes #37210 for 4.2.

Built from https://develop.svn.wordpress.org/branches/4.2@39789


git-svn-id: http://core.svn.wordpress.org/branches/4.2@39727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 05:25:28 +00:00
Jeremy Felt
516cd7a86c Mail: Disable wp-mail.php when mailserver_url is mail.example.com.
Merges [39772] to the 4.2 branch.

Built from https://develop.svn.wordpress.org/branches/4.2@39778


git-svn-id: http://core.svn.wordpress.org/branches/4.2@39716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 05:19:26 +00:00
Aaron Campbell
9f4a883e2f Add nonce for widget accessibility mode.
Props vortfu.

See #23328.

Merges [39765] to 4.2 branch.

Built from https://develop.svn.wordpress.org/branches/4.2@39766


git-svn-id: http://core.svn.wordpress.org/branches/4.2@39704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 01:49:32 +00:00
Dion Hulse
755a765d49 Mail: Upgrade PHPMailer to 5.2.21.
Merges [39645], [36083], [33142], [33124] to the 4.2 branch.
See #37210.

Built from https://develop.svn.wordpress.org/branches/4.2@39726


git-svn-id: http://core.svn.wordpress.org/branches/4.2@39666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:06:00 +00:00
Joe McGill
8afdd2be32 Media: Improved media titles when created from filename.
Preserves spaces and generally creates more accurate, cleaner titles from filenames of uploaded media.

Merge of [38615] to the 4.2 branch.

Fixes #37989.

Built from https://develop.svn.wordpress.org/branches/4.2@39714


git-svn-id: http://core.svn.wordpress.org/branches/4.2@39654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:01:02 +00:00
Dion Hulse
fe2cc48d0e General: Update copyright year to 2017 in license.txt.
Props Nikschavan.
Merges [39659] to the 4.2 branch.
Fixes #39433.

Built from https://develop.svn.wordpress.org/branches/4.2@39702


git-svn-id: http://core.svn.wordpress.org/branches/4.2@39642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-05 08:44:31 +00:00
Jeremy Felt
e57416e1d7 Bump 4.2 branch to 4.2.10.
Built from https://develop.svn.wordpress.org/branches/4.2@38553


git-svn-id: http://core.svn.wordpress.org/branches/4.2@38496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-07 15:00:32 +00:00
Jeremy Felt
f7adf3c9d2 Media: Sanitize upload filename.
Merge of [38538] to the 4.2 branch.

Built from https://develop.svn.wordpress.org/branches/4.2@38543


git-svn-id: http://core.svn.wordpress.org/branches/4.2@38486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-07 13:59:32 +00:00
Pascal Birchler
0e5485fe33 Upgrade/Install: Sanitize file name in File_Upload_Upgrader.
Merge of [38524] to the 4.2 branch.
Built from https://develop.svn.wordpress.org/branches/4.2@38529


git-svn-id: http://core.svn.wordpress.org/branches/4.2@38470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-06 17:55:29 +00:00
Gary Pendergast
2c40eb4cf2 Database: dbDelta() will no longer try to downgrade the size of TEXT and BLOB columns.
When upgrading to `utf8mb4`, `TEXT` fields will be upgraded to `MEDIUMTEXT` (and likewise for all other `*TEXT` and `*BLOB` fields). This is to allow for the additional space requirements of `utf8mb4`.

On the subsequent upgrade, `dbDelta()` would try and downgrade the fields to their original size again. At best, this it a waste of time, at worst, this could truncate any data larger than the original size. There's no harm in leaving them at their new size, so let's do that.

The `FULLTEXT` indexes are removed from the tests, as `dbDelta()`'s `FULLTEXT` support was added in WordPress 4.4.

This also includes the `setUp()` and `tearDown()` parts of [32270], to allow the tests to run, and fixes a typo them.

Merge of [37525] to the 4.2 branch.
Partial merge of [36552] to the 4.2 branch.
Partial merge of [32270] to the 4.2 branch.

See #36748.


Built from https://develop.svn.wordpress.org/branches/4.2@37939


git-svn-id: http://core.svn.wordpress.org/branches/4.2@37880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-01 11:51:28 +00:00
Boone Gorges
3042245749 Bump 4.2 branch to 4.2.9.
Built from https://develop.svn.wordpress.org/branches/4.2@37831


git-svn-id: http://core.svn.wordpress.org/branches/4.2@37796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-21 16:36:27 +00:00
Joe McGill
754a809bfb Media: Improve handling of extensionless filenames.
Merge of [37756] to the 4.2 branch.

See #37111.
Built from https://develop.svn.wordpress.org/branches/4.2@37816


git-svn-id: http://core.svn.wordpress.org/branches/4.2@37781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-21 14:56:48 +00:00
Nikolay Bachiyski
3c1876e6c5 Admin: escape URL-encoded permalinks
Merge of [37801] to the 4.2 branch.

Built from https://develop.svn.wordpress.org/branches/4.2@37812


git-svn-id: http://core.svn.wordpress.org/branches/4.2@37777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-21 14:54:28 +00:00
Rachel Baker
d5a6676eb2 Revisions: Change the capability needed to view revision diffs to edit_post.
Merge of [37779] to the 4.2 branch.
Built from https://develop.svn.wordpress.org/branches/4.2@37799


git-svn-id: http://core.svn.wordpress.org/branches/4.2@37764 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-21 14:44:29 +00:00
Nikolay Bachiyski
437f727e8f Admin: Escape attachment name in case it contains special characters
Merge of [37774] to the 4.2 branch.

Built from https://develop.svn.wordpress.org/branches/4.2@37789


git-svn-id: http://core.svn.wordpress.org/branches/4.2@37754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-21 14:26:11 +00:00
Boone Gorges
b4bf158d3a Taxonomy: More specific cap check when processing category data on post save.
Ports [37691] to the 4.2 branch.

Props dlh.
Fixes #36379.
Built from https://develop.svn.wordpress.org/branches/4.2@37776


git-svn-id: http://core.svn.wordpress.org/branches/4.2@37741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-21 14:21:38 +00:00
Dominik Schilling
569f0c90fc Customize: Make sure that preview and return URLs are URLs.
Merge of [37527] to the 4.2 branch.
Built from https://develop.svn.wordpress.org/branches/4.2@37772


git-svn-id: http://core.svn.wordpress.org/branches/4.2@37737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-21 14:19:48 +00:00
Jeremy Felt
0ba49c4a4c Admin: Allow for the consistent filtering of auth_redirect_scheme
Merge of [37651] to the 4.2 branch.

See #37047.

Built from https://develop.svn.wordpress.org/branches/4.2@37761


git-svn-id: http://core.svn.wordpress.org/branches/4.2@37726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-21 14:12:47 +00:00
Dominik Schilling
94306911e2 Bump 4.2 branch to 4.2.8.
Built from https://develop.svn.wordpress.org/branches/4.2@37387


git-svn-id: http://core.svn.wordpress.org/branches/4.2@37353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-06 18:13:27 +00:00
Nikolay Bachiyski
96731bcfb4 External Libraries: Update plupload from upstream
Built from https://develop.svn.wordpress.org/branches/4.2@37379


git-svn-id: http://core.svn.wordpress.org/branches/4.2@37345 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-06 17:59:26 +00:00
Dominik Schilling
e35259b0bc External Libraries: Update MediaElement.js from upstream.
Merge of [37370] to the 4.2 branch.
Built from https://develop.svn.wordpress.org/branches/4.2@37375


git-svn-id: http://core.svn.wordpress.org/branches/4.2@37341 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-06 17:55:00 +00:00
Nikolay Bachiyski
0986b209ea Taxonomies: make sure taxonomy functions work correctly with taxonomy names with special characters
The codex says that taxonomy names "should only contain lowercase letters and the underscore character", but that's not enforced. It's too late to enforce it, since some plugins haven't been following it and the official phpdoc doesn't mention this restriction.

Merge of [37133] to the 4.2 branch.

Built from https://develop.svn.wordpress.org/branches/4.2@37137


git-svn-id: http://core.svn.wordpress.org/branches/4.2@37104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-30 17:29:28 +00:00
Jeremy Felt
6d9698863c Multisite: Improve escaping in network settings.
Merge of [37124] to the 4.2 branch.

Built from https://develop.svn.wordpress.org/branches/4.2@37127


git-svn-id: http://core.svn.wordpress.org/branches/4.2@37094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-30 16:02:49 +00:00
Dominik Schilling
a60f6eea61 HTTP: Improve detection of valid IP addresses.
Merge of [37115] to the 4.2 branch.
Built from https://develop.svn.wordpress.org/branches/4.2@37118


git-svn-id: http://core.svn.wordpress.org/branches/4.2@37085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-30 15:52:12 +00:00
Dominik Schilling
1c4f8827a2 Multisite: Validate new email address confirmations.
Merge of [37103] to the 4.2 branch.
Built from https://develop.svn.wordpress.org/branches/4.2@37106


git-svn-id: http://core.svn.wordpress.org/branches/4.2@37073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-30 14:50:27 +00:00
Nikolay Bachiyski
080ef55551 Snoopy: use escapeshellarg instead of escapeshellcmd
We are escaping arguments, not commands, so we'd better use the semantically correct function, even though they are similar.

Merges [37094] to the 4.2 branch.

Built from https://develop.svn.wordpress.org/branches/4.2@37097


git-svn-id: http://core.svn.wordpress.org/branches/4.2@37064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-30 14:08:28 +00:00
Dominik Schilling
666b9f8558 Bump 4.2 branch to 4.2.7.
Built from https://develop.svn.wordpress.org/branches/4.2@36457


git-svn-id: http://core.svn.wordpress.org/branches/4.2@36424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-02 17:28:49 +00:00
Dominik Schilling
c1769766f6 Better validation of the URL used in HTTP redirects.
Merges [36444] to the 4.2 branch.
Built from https://develop.svn.wordpress.org/branches/4.2@36449


git-svn-id: http://core.svn.wordpress.org/branches/4.2@36416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-02 17:00:28 +00:00
Dominik Schilling
c30865a6b5 HTTP: 0.1.2.3 is not a valid IP.
Merges [36435] to the 4.2 branch.
Built from https://develop.svn.wordpress.org/branches/4.2@36438


git-svn-id: http://core.svn.wordpress.org/branches/4.2@36405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-02 13:04:20 +00:00
Dominik Schilling
c897bed043 Bump 4.2 branch to 4.2.6.
Built from https://develop.svn.wordpress.org/branches/4.2@36198


git-svn-id: http://core.svn.wordpress.org/branches/4.2@36165 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-06 18:49:27 +00:00
Aaron Jorbin
f26900d209 Theme: Escape error messages
[36185] for 4.2 branch

Built from https://develop.svn.wordpress.org/branches/4.2@36188


git-svn-id: http://core.svn.wordpress.org/branches/4.2@36155 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-06 17:26:28 +00:00
Dion Hulse
5686506414 Background Updates: Remove the 7am/7pm background update check.
This changeset is a more basic version of [36180], clearing the extra now redundant schedule.
As the functionality for this was introduced in 3.9, [28129] has been backported to 3.7/3.8, allowing the API TTL to be respected by those versions.

See #27772.
Fixes #35323.

Built from https://develop.svn.wordpress.org/trunk@36184


git-svn-id: http://core.svn.wordpress.org/branches/4.2@36151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-06 13:24:33 +00:00
Dion Hulse
0c79ef9ef8 Update Akismet externals
git-svn-id: http://core.svn.wordpress.org/branches/4.2@35107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-13 17:19:01 +00:00
Helen Hou-Sandí
ca39e38e59 Finish bumping the 4.2 branch to 4.2.5.
Built from https://develop.svn.wordpress.org/branches/4.2@34190


git-svn-id: http://core.svn.wordpress.org/branches/4.2@34158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 14:50:07 +00:00
Helen Hou-Sandí
629e2b70f7 Bump 4.2 branch to 4.2.5.
Built from https://develop.svn.wordpress.org/branches/4.2@34182


git-svn-id: http://core.svn.wordpress.org/branches/4.2@34150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 14:27:44 +00:00
Dominik Schilling
ec4db723d2 XMLRPC: Don't allow private posts to be sticky.
Merge of [33325], [33612], and [34135] to the 4.2 branch.

See #20662.
Built from https://develop.svn.wordpress.org/branches/4.2@34152


git-svn-id: http://core.svn.wordpress.org/branches/4.2@34120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 22:51:28 +00:00
Nikolay Bachiyski
a4dba03383 Shortcodes: don't allow unclosed HTML elements in attributes
Merges [34134] for 4.2 branch

Built from https://develop.svn.wordpress.org/branches/4.2@34145


git-svn-id: http://core.svn.wordpress.org/branches/4.2@34113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 22:48:27 +00:00
Nikolay Bachiyski
c8d3901f8f List tables: escape user e-mails
Merges [34133] for 4.2 branch

Built from https://develop.svn.wordpress.org/branches/4.2@34138


git-svn-id: http://core.svn.wordpress.org/branches/4.2@34106 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 22:41:28 +00:00
Gary Pendergast
56b1ceaf04 WPDB: get_table_from_query() didn't find table names with hyphens in them.
Merge of [33718] to the 4.2 branch.

Props dustinbolton, pento.

See #33470.


Built from https://develop.svn.wordpress.org/branches/4.2@33992


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 06:57:28 +00:00
Gary Pendergast
6b2df3479c Capabilities: Fall back to the edit_posts capability for orphaned comments.
Merge of the `capabilities.php` part of [33614] to the 4.2 branch.

Props pento, dd32.

See #33154.


Built from https://develop.svn.wordpress.org/branches/4.2@33972


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-09 06:01:28 +00:00
Andrew Nacin
439841760c Bump the 4.2 branch to 4.2.5-alpha.
Built from https://develop.svn.wordpress.org/branches/4.2@33587


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-05 22:02:28 +00:00
Dominik Schilling
a4279152fc Bump 4.2 branch to version 4.2.4.
Built from https://develop.svn.wordpress.org/branches/4.2@33573


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-04 11:50:27 +00:00
Dominik Schilling
f59f79151e Comments: IDs are integers.
Merge of [33555] to the 4.2 branch.
Built from https://develop.svn.wordpress.org/branches/4.2@33556


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-04 04:59:00 +00:00
Dominik Schilling
e2e6972945 Themes: Fix some broken links in the legacy theme preview.
Built from https://develop.svn.wordpress.org/branches/4.2@33549


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33516 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-04 04:56:47 +00:00
Dominik Schilling
b0b028eacd Heartbeat: Ensure post locks are released.
Merge of [33542] to the 4.2 branch.
Built from https://develop.svn.wordpress.org/branches/4.2@33543


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-04 04:54:59 +00:00
Dominik Schilling
fe8fa1b562 Nav menus: Adjust redundant titles in accessibility helpers.
Merge of [33540] to the 4.2 branch.
Built from https://develop.svn.wordpress.org/branches/4.2@33541


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33508 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-04 04:54:09 +00:00
Dominik Schilling
008c4fe3c4 Customizer: Use hash_equals() for widgets.
Merge of [33535] to the 4.2 branch.
Built from https://develop.svn.wordpress.org/branches/4.2@33536


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-04 04:52:16 +00:00
Dominik Schilling
ddf451dbb5 Nav menus: Consistent titles in widgets.
Built from https://develop.svn.wordpress.org/branches/4.2@33529


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-03 20:57:42 +00:00
Helen Hou-Sandí
5198ab8672 The 4.2 branch is now 4.2.4-RC1.
Built from https://develop.svn.wordpress.org/branches/4.2@33520


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-30 20:39:26 +00:00
Andrew Ozz
373ba799c3 Backport r33469 and r33470 to 4.2.
See #33106.
Built from https://develop.svn.wordpress.org/branches/4.2@33518


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-30 19:41:27 +00:00
Andrew Ozz
ce7113bc3e Fix do_shortcode('<[shortcode]') edge case.
Props miqrogroove. Fixes #33116 for 4.2.
Built from https://develop.svn.wordpress.org/branches/4.2@33499


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 20:07:27 +00:00
Gary Pendergast
c58e9ddf35 Don't blindly trust the output of glob() to be an array.
Props kitchin.

Merge of [33447] to the 4.2 branch.

Fixes #33093.


Built from https://develop.svn.wordpress.org/branches/4.2@33481


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 06:53:28 +00:00
Gary Pendergast
371f520a52 WPDB: When checking the encoding of strings against the database, make sure we're only relying on the return value of strings that were sent to the database. Also make sure that we're not trying to sanity check strings that've been marked as not needing sanity checking.
Merge of [33455] to the 4.2 branch.

See #32279.


Built from https://develop.svn.wordpress.org/branches/4.2@33476


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 06:22:27 +00:00
Gary Pendergast
d8eb8da38a Bump 4.2 branch to version 4.2.3.
Built from https://develop.svn.wordpress.org/branches/4.2@33395


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-23 11:03:27 +00:00
Gary Pendergast
68c10bf9e1 Bump 4.2 branch version to 4.2.3-beta1.
Built from https://develop.svn.wordpress.org/branches/4.2@33361


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33333 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-22 05:51:27 +00:00
Gary Pendergast
4cd2612edc Shortcodes: Improve the reliablity of shortcodes inside HTML tags.
Merge of [33359] to the 4.2 branch.

Props miqrogroove.

See #15694.


Built from https://develop.svn.wordpress.org/branches/4.2@33360


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-22 05:44:27 +00:00
Gary Pendergast
fe2d10ea5c Capabilities: When creating an auto-draft, ensure that the current user still has permission to do so.
Merge of [33357] to the 4.2 branch.


Built from https://develop.svn.wordpress.org/branches/4.2@33358


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33330 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-22 04:06:28 +00:00
Gary Pendergast
85e880b5b2 sanitize_option() needs to handle WP_Error. DRY the conditional calls to add_settings_error().
Merge of [32791] to the 4.2 branch.

Props wonderboymusic, chriscct7 for an initial patch.

Fixes #32350.


Built from https://develop.svn.wordpress.org/branches/4.2@33326


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-19 23:26:27 +00:00
Dion Hulse
0f9cb9ce20 Updates: Better handling when the credential form is long (such as when SSH is active). This adds scrolling to the dialogue, and hides the SSH-specific fields when not using the SSH handler.
Merges [32777] to the 4.2 branch, the JS changes were previously merged in [33304]
See #32435

Built from https://develop.svn.wordpress.org/branches/4.2@33319


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-18 05:25:28 +00:00
Andrew Ozz
78fc515bf3 TinyMCE wpView: preserve HTML wrapped in shortcodes.
Props iseulde, azaozz. Fixes #32078 for 4.2.
Built from https://develop.svn.wordpress.org/branches/4.2@33316


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-17 22:02:26 +00:00
Andrew Ozz
9a74f7c01a Check if running from /src or SCRIPT_DEBUG is defined in print_emoji_detection_script().
Fixes #32118 for 4.2.
Built from https://develop.svn.wordpress.org/branches/4.2@33315


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33287 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-17 21:40:27 +00:00
Andrew Ozz
22e22a3db7 TinyMCE: wpView: fix typo in createInstance that prevented instances from being reused.
Props iseulde. Fixes #32591 for 4.2.
Built from https://develop.svn.wordpress.org/branches/4.2@33314


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33286 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-17 21:22:27 +00:00
Andrew Ozz
020f33ba74 Widgets:
- Fix dragging to the bottom of the screen on the Widgets and Dashboard screens.
- Fix hiding of the dragged widget when dragging over a closed sidebar.
- Fix the admin menu position and scrolling when all widget containers are folded.
Fixes #32094 for 4.2.
Built from https://develop.svn.wordpress.org/branches/4.2@33313


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33285 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-17 21:06:27 +00:00
Andrew Ozz
72a321196e Emoji: do not try to replace emoji chars inside SVGs.
Fixes #32305 for 4.2.
Built from https://develop.svn.wordpress.org/branches/4.2@33312


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-17 20:17:27 +00:00
Gary Pendergast
0300e1f14a WPDB: ::strip_text_from_query() doesn't pass a length to ::strip_invalid_text(), which was causing queries to fail when they contained characters that needed to be sanity checked by MySQL.
Props dd32, mdawaffe, pento.

Merges [33310] to the 4.2 branch.

Fixes #32279.


Built from https://develop.svn.wordpress.org/branches/4.2@33311


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-17 07:10:28 +00:00
Gary Pendergast
8429597071 WPDB: Remove some of the complexities in ::strip_invalid_text() associated with switching character sets between queries. Instead of trying to dynamically change connection character sets, we now rely on the value of ::charset. This also fixes the case where queries were being blocked when DB_CHARSET was utf8, but the column character set was non-utf8.
Merge of [33308] to the 4.2 branch.

Fixes #32165.


Built from https://develop.svn.wordpress.org/branches/4.2@33309


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-17 06:38:29 +00:00
Gary Pendergast
722c40dda7 In comment_form(), ensure that filtered arguments contain all required default values.
Merge of [32511] to the 4.2 branch.

Props boonebgorges.
Fixes #32312.


Built from https://develop.svn.wordpress.org/branches/4.2@33307


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33279 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-17 06:14:26 +00:00
Dion Hulse
c4faea356b Updates: When an update fails (and it's not during the credential form) allow further updates to continue, with the assumption that the error only affects a single plugin.
Props magicroundabout.
Merges [32780] to the 4.2 branch
Fixes #32110 for 4.2


Built from https://develop.svn.wordpress.org/branches/4.2@33306


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33278 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-17 04:09:27 +00:00
Dion Hulse
78b8290b7a Updates: Display the failure reason in addition to 'Update Failed', allows for debugging by site owners.
Merges the behaviour of [32779] to the 4.2 branch without a string change.
See #32435, #32473

Built from https://develop.svn.wordpress.org/branches/4.2@33305


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33277 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-17 04:07:27 +00:00
Dion Hulse
c33661c857 Updates: Better handling when the credential form is long (such as when SSH is active).
Merges the JS changes from [32777] to the 4.2 branch
See #32435

Built from https://develop.svn.wordpress.org/branches/4.2@33304


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-17 04:03:26 +00:00
Dion Hulse
3f40fe30a8 Updates: When a connection failure occurs, and no credential form is present client side, allow it to fall through to the normal failure handlers.
Merges [32776] to the 4.2 branch
See #32435

Built from https://develop.svn.wordpress.org/branches/4.2@33303


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-17 04:01:27 +00:00
Dion Hulse
b6058e2231 Updates: Correctly identify more failed update cases.
This checks for a WP_Error being raised during an individual update, in addition to just the bootstrap error cases.
When a error occurs during the connection phase, pass the error message back as the ajax failure message.

Merges [32571] & [32778] to the 4.2 branch

See #32473, #32435

Built from https://develop.svn.wordpress.org/branches/4.2@33302


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-17 03:59:28 +00:00
Dion Hulse
8e96288144 Shiny Updates: Handle the case where the plugin is installed into a different directory than it previously existed in.
A good example of this is when the plugin being updated is currently installed as 'Plugin-Name' but the canonical directory is 'plugin-name', but it can also occur when the plugin is installed in 'super-cool-plugin' and it's canonical name is 'average-plugin'.

Merges [32570] to the 4.2 branch.
Fixes #32465

Built from https://develop.svn.wordpress.org/branches/4.2@33301


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-17 03:55:28 +00:00
Gary Pendergast
19aa985476 WPDB: When checking that text isn't too long to insert into a column, LONGTEXT columns could fail, as their length is longer than PHP_INT_MAX. Treating their length as a float instead of an int fixes this.
Merge of [33276] to the 4.2 branch.

See #32165.


Built from https://develop.svn.wordpress.org/branches/4.2@33277


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33249 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-15 04:40:29 +00:00
Gary Pendergast
c43baf9ef4 WPDB: When extracting the table name from a query, we had a 1000 character limit on the SQL string that would be searched. This was a hangover from when the code was imported from HyperDB, and isn't appropriate for Core, where a wider range of queries are likely to be run.
Merges [33259] to the 4.2 branch.

Fixes #32763


Built from https://develop.svn.wordpress.org/branches/4.2@33260


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33232 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-14 10:21:26 +00:00
Dion Hulse
7090cf8980 Updates: When performing an ajax plugin update, rely upon wp_update_plugins() to check the contents of the transient and return early if no request needs to be made.
This works around a bug where custom update handlers are injecting an update into an empty transient, malforming the transient and causing update failures.
Merges [33257] to the 4.2 branch.
Fixes #32198 for 4.2

Built from https://develop.svn.wordpress.org/branches/4.2@33258


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33230 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-14 08:04:27 +00:00
Dion Hulse
63f64d5909 Enable utf8mb4 for MySQL extension users. Previously utf8mb4 was limited to MySQLi users only unintentionally.
Ports [33055] to the 4.2 branch
Fixes #32127 for 4.2.3

Built from https://develop.svn.wordpress.org/branches/4.2@33063


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-03 12:44:28 +00:00
Dion Hulse
61122743e2 Don't upgrade global tables to utf8mb4 when DO_NOT_UPGRADE_GLOBAL_TABLES is defined.
This change also standardises on only checking `DO_NOT_UPGRADE_GLOBAL_TABLES` is defined, not it's value.

Fixes #32154 for 4.2

Built from https://develop.svn.wordpress.org/branches/4.2@33059


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-03 05:59:27 +00:00
Dion Hulse
371db8aea1 Remove a redundant index drop, it'll be dropped and re-created a few lines further down.
Fixes a warning during updating from 4.0 or earlier.
Merges [32852] to the 4.2 branch. Fixes #31388 for 4.2

Built from https://develop.svn.wordpress.org/branches/4.2@32853


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 03:20:30 +00:00
Dominik Schilling
cf02c02024 4.2 branch is now 4.2.3-alpha.
Built from https://develop.svn.wordpress.org/branches/4.2@32470


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-09 18:05:30 +00:00
Gary Pendergast
ca13bd76d5 Upgrades: If a table has already been converted to utf8mb4, there's no need to try and convert it again.
Props gabrielperezs for the initial patch.

Merge of [32456] to the 4.2 branch.

Fixes #32310.


Built from https://develop.svn.wordpress.org/branches/4.2@32457


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-08 12:28:28 +00:00
Andrew Nacin
1ee5e6c4dd Twenty Fifteen is 1.2 after [32392].
Built from https://develop.svn.wordpress.org/branches/4.2@32443


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-07 01:41:27 +00:00
Michael Adams
ba2de1e736 Upgrade: Since MySQL may auto-expand column widths when changing a column's character set, we must do our length-based comment checks prior to the character set changes.
Props jorbin, et alii.

Merges [32440] for the 4.2 branch.

See #32165.

Built from https://develop.svn.wordpress.org/branches/4.2@32441


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-07 01:12:29 +00:00
Michael Adams
ff4c5d2767 Upgrade: $wpdb->get_col_length() sanity check: bail on unexpected return value.
See #32165.

Built from https://develop.svn.wordpress.org/branches/4.2@32430


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-06 23:12:27 +00:00
Dominik Schilling
599782db47 Add closing paragraph tag for the 4.2.2 changelog entry.
Built from https://develop.svn.wordpress.org/branches/4.2@32427


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-06 23:03:28 +00:00
Boone Gorges
e1f9360463 Remove duplicate semicolon introduced in [32384].
Built from https://develop.svn.wordpress.org/branches/4.2@32426


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-06 22:49:28 +00:00
Dominik Schilling
fc3a071185 4.2.2 version bumps.
Built from https://develop.svn.wordpress.org/branches/4.2@32424


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-06 22:07:27 +00:00
Michael Adams
f3d41b7b38 Upgrade: Ensure unintelligible DB schemas don't result in content loss.
Merge of [32417] to the 4.2 branch.

See #32165.

Props ocean90.

Built from https://develop.svn.wordpress.org/branches/4.2@32418


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-06 21:50:29 +00:00
Dominik Schilling
e568d1e4b7 Bundled Themes: Remove Genericons example.html files.
Merge [32392] to the 4.2 branch.
Built from https://develop.svn.wordpress.org/branches/4.2@32393


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-06 19:31:28 +00:00
Aaron Jorbin
ca97837cf3 When upgrading WordPress remove genericons example.html files
[32385] for 4.2 branch

Props @dd32, @boone, @johnjamesjacoby, @drewapicture, @jorbin


Built from https://develop.svn.wordpress.org/branches/4.2@32386


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32356 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-06 18:39:28 +00:00
Boone Gorges
0baf141106 Attachment URLs should only be forced to SSL on the front end.
Detecting SSL status on the Dashboard introduces problems when writing content
that is saved to the database and then displayed on the front end, where SSL
may be optional (or impossible, due to self-signed certificates). The new
approach parallels the logic in `get_home_url()` for forcing HTTPS.

See [31614] #15928 for background.

Fixes #32112 for 4.2 branch.

Built from https://develop.svn.wordpress.org/branches/4.2@32384


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32354 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-06 16:21:29 +00:00
Boone Gorges
80d7ad721a Improve performance of loop detection in _get_term_children().
Using an array keyed by term_id allows us to use `isset()` rather than the
 slower `in_array()`. In addition, it lets us avoid the use of `wp_list_pluck()`
 on large arrays, and helps us to avoid arrays that are unnecessarily large due
 to duplicate entries.

 Fixes #32144 for 4.2 branch.

Built from https://develop.svn.wordpress.org/branches/4.2@32383


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-06 16:19:28 +00:00
Gary Pendergast
5c01870b62 Upgrades: When converting to utf8mb4, we were trying to change the wrong index on wp_signups, causing the conversion to later fail.
Merge [32378] to the 4.2 branch.

Props kovshenin, pento.

Fixes #32099.


Built from https://develop.svn.wordpress.org/branches/4.2@32380


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-06 07:42:28 +00:00
Gary Pendergast
5d957b7c84 WPDB: When sanity checking query character sets, there's no need to check queries that don't return user data.
Merges [32374] to the 4.2 branch.

See #32104.


Built from https://develop.svn.wordpress.org/branches/4.2@32377


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-06 07:14:29 +00:00
Gary Pendergast
8c578f0e0c The UTF-8 regex can occasionally fail on very low memory machines. Reduce the amount of memory it uses.
Merges [32375] to the 4.2 branch.

See #32204.


Built from https://develop.svn.wordpress.org/branches/4.2@32376


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-06 07:06:29 +00:00
Gary Pendergast
b0b230fab4 WPDB: Allow queries to reference tables in the dbname.tablename format, and allow table names to contain any valid character, rather than just ASCII.
Merge of [32368] to the 4.2 branch.

Props pento, willstedt for the initial patch.

See #32090.

Built from https://develop.svn.wordpress.org/branches/4.2@32370


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32340 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-06 05:17:30 +00:00
Andrew Ozz
568c4e8f56 Add some of the TinyMCE 4.1.10 fixes to 4.2.
See [32366], 32262.
Built from https://develop.svn.wordpress.org/branches/4.2@32369


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32339 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-06 05:12:29 +00:00
Gary Pendergast
db8f915ee6 WPDB: When checking that a string can be sent to MySQL, we shouldn't use mb_convert_encoding(), as it behaves differently to MySQL's character encoding conversion.
Merge of [32364] to the 4.2 branch.

Props mdawaffe, pento, nbachiyski, jorbin, johnjamesjacoby, jeremyfelt.

See #32165.


Built from https://develop.svn.wordpress.org/branches/4.2@32367


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32337 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-06 03:30:30 +00:00
Andrew Ozz
c08ee82b3c TinyMCE: fix Mac keyboard shortcut for save from the visual editor.
Props iseulde. Fixes #32122 for 4.2.
Built from https://develop.svn.wordpress.org/branches/4.2@32363


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32334 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-06 02:30:27 +00:00
Andrew Ozz
6f00d59589 Emoji: add an exclude class to wp-emoji checked when monitoring for changes with MutationObserver. Use it for the hidden div used for resizing the Text editor.
Fixes #32197 for 4.2.
Built from https://develop.svn.wordpress.org/branches/4.2@32362


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32333 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-06 02:25:28 +00:00
Andrew Ozz
897691addd Emoji:
- Fix loading errors in IE9 and IE10.
- Add fallbacks for the loading events.
Fixes #32109 for 4.2.
Built from https://develop.svn.wordpress.org/branches/4.2@32361


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-06 01:35:26 +00:00
Andrew Ozz
be8bdfb795 Emoji: fix loop when replacement images fail to load.
Props iseulde. Fixes #32128 for 4.2.
Built from https://develop.svn.wordpress.org/branches/4.2@32360


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32331 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-06 01:26:28 +00:00
Dion Hulse
4202e36193 When creating a temporary file treat the / directory properly, to prevent it ending up in an endless self-calling loop.
Props hnle, taka2. Fixes #32135. See #31811
Merges [32322] to the 4.2 branch.

Built from https://develop.svn.wordpress.org/branches/4.2@32324


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-29 03:20:29 +00:00
Gary Pendergast
a3a76fe665 4.2: When upgrading, remove any suspicious comments.
Built from https://develop.svn.wordpress.org/branches/4.2@32311


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-27 17:10:29 +00:00
Andrew Nacin
5c2b420b29 WPDB: Sanity check that any strings being stored in the DB are not too long to store correctly.
Merge [32299] to the 4.1 and 4.2 branches.

Built from https://develop.svn.wordpress.org/@32307


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32278 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-27 15:31:44 +00:00
Gary Pendergast
f0a9d2e5a1 4.2 branch is now 4.2.1-alpha.
Built from https://develop.svn.wordpress.org/branches/4.2@32300


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-27 14:06:30 +00:00
Drew Jaynes
ca542b5d18 WordPress 4.2
Built from https://develop.svn.wordpress.org/branches/4.2@32279


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32250 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-23 16:26:10 +00:00
Andrew Nacin
865b9a613e Branch 4.2.
Built from https://develop.svn.wordpress.org/@32278

git-svn-id: http://core.svn.wordpress.org/branches/4.2@32249 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-23 16:18:07 +00:00
118 changed files with 3909 additions and 3301 deletions

View File

@@ -1,6 +1,6 @@
WordPress - Web publishing software
Copyright 2015 by the contributors
Copyright 2017 by the contributors
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

View File

@@ -9,7 +9,7 @@
<body>
<h1 id="logo">
<a href="https://wordpress.org/"><img alt="WordPress" src="wp-admin/images/wordpress-logo.png" /></a>
<br /> Version 4.2
<br /> Version 4.2.14
</h1>
<p style="text-align: center">Semantic Personal Publishing Platform</p>

View File

@@ -40,6 +40,66 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
</a>
</h2>
<div class="changelog point-releases">
<h3><?php echo _n( 'Maintenance and Security Release', 'Maintenance and Security Releases', 14 ); ?></h3>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed %2$s bug.',
'<strong>Version %1$s</strong> addressed %2$s bugs.', 1 ), '4.2.14', number_format_i18n( 1 ) ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.2.14' ); ?>
</p>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed a security issue.',
'<strong>Version %1$s</strong> addressed some security issues.', 6 ), '4.2.13' ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.2.13' ); ?>
</p>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed a security issue.',
'<strong>Version %1$s</strong> addressed some security issues.', 3 ), '4.2.12' ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.2.12' ); ?>
</p>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed a security issue.',
'<strong>Version %1$s</strong> addressed some security issues.', 8 ), '4.2.11' ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.2.11' ); ?>
</p>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.', 1 ), '4.2.10', number_format_i18n( 1 ) ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.2.10' ); ?>
</p>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed a security issue.',
'<strong>Version %1$s</strong> addressed some security issues.', 9 ), '4.2.9' ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.2.9' ); ?>
</p>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed a security issue.',
'<strong>Version %1$s</strong> addressed some security issues.', 6 ), '4.2.8' ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.2.8' ); ?>
</p>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed a security issue.',
'<strong>Version %1$s</strong> addressed some security issues.', 2 ), '4.2.7' ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.2.7' ); ?>
</p>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed a security issue.',
'<strong>Version %1$s</strong> addressed some security issues.', 1 ), '4.2.6' ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.2.6' ); ?>
</p>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.', 2 ), '4.2.5', number_format_i18n( 2 ) ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.2.5' ); ?>
</p>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.', 4 ), '4.2.4', number_format_i18n( 4 ) ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.2.4' ); ?>
</p>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.', 20 ), '4.2.3', number_format_i18n( 20 ) ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.2.3' ); ?>
</p>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.', 13 ), '4.2.2', number_format_i18n( 13 ) ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.2.2' ); ?>
</p>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed a security issue.',
'<strong>Version %1$s</strong> addressed some security issues.', 1 ), '4.2.1' ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.2.1' ); ?>
</p>
</div>
<div class="headline-feature feature-video">
<embed type="application/x-shockwave-flash" src="https://v0.wordpress.com/player.swf?v=1.04" width="1000" height="560" wmode="direct" seamlesstabbing="true" allowfullscreen="true" allowscriptaccess="always" overstretch="true" flashvars="guid=e9kH4FzP&amp;isDynamicSeeking=true"></embed>
</div>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -545,6 +545,7 @@ span.wp-media-buttons-icon:before {
.notification-dialog {
position: fixed;
top: 30%;
max-height: 70%;
right: 50%;
width: 450px;
margin-right: -225px;
@@ -553,6 +554,7 @@ span.wp-media-buttons-icon:before {
box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 );
line-height: 1.5;
z-index: 1000005;
overflow-y: auto;
}
.notification-dialog-background {

View File

@@ -545,6 +545,7 @@ span.wp-media-buttons-icon:before {
.notification-dialog {
position: fixed;
top: 30%;
max-height: 70%;
left: 50%;
width: 450px;
margin-left: -225px;
@@ -553,6 +554,7 @@ span.wp-media-buttons-icon:before {
box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 );
line-height: 1.5;
z-index: 1000005;
overflow-y: auto;
}
.notification-dialog-background {

View File

@@ -862,6 +862,7 @@ table.form-table td .updated p {
.request-filesystem-credentials-dialog .notification-dialog {
top: 15%;
max-height: 85%;
}
.request-filesystem-credentials-dialog-content {
@@ -1157,11 +1158,11 @@ table.form-table td .updated p {
.request-filesystem-credentials-dialog .notification-dialog{
width: 100%;
height: 100%;
max-height: 100%;
position: fixed;
top: 0;
margin: 0;
right: 0;
overflow-y: auto;
}
}

View File

@@ -862,6 +862,7 @@ table.form-table td .updated p {
.request-filesystem-credentials-dialog .notification-dialog {
top: 15%;
max-height: 85%;
}
.request-filesystem-credentials-dialog-content {
@@ -1157,11 +1158,11 @@ table.form-table td .updated p {
.request-filesystem-credentials-dialog .notification-dialog{
width: 100%;
height: 100%;
max-height: 100%;
position: fixed;
top: 0;
margin: 0;
left: 0;
overflow-y: auto;
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -846,6 +846,7 @@ input[type="search"].categories-search,
border-bottom: 1px solid #e5e5e5;
font-size: 14px;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}

File diff suppressed because one or more lines are too long

View File

@@ -846,6 +846,7 @@ input[type="search"].categories-search,
border-bottom: 1px solid #e5e5e5;
font-size: 14px;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}

File diff suppressed because one or more lines are too long

View File

@@ -350,6 +350,10 @@ div#widgets-right .closed .widgets-sortables {
display: none;
}
.js .widgets-holder-wrap.closed .widget.ui-sortable-helper {
display: block;
}
/* Hide Widget Settings by Default */
.widget-inside,
.widget-description {
@@ -506,6 +510,10 @@ div#widgets-right .widget-top:hover,
cursor: pointer;
}
#available-widgets .widget.ui-draggable-dragging .widget-top {
cursor: move;
}
/* =Media Queries
-------------------------------------------------------------- */

View File

@@ -350,6 +350,10 @@ div#widgets-right .closed .widgets-sortables {
display: none;
}
.js .widgets-holder-wrap.closed .widget.ui-sortable-helper {
display: block;
}
/* Hide Widget Settings by Default */
.widget-inside,
.widget-description {
@@ -506,6 +510,10 @@ div#widgets-right .widget-top:hover,
cursor: pointer;
}
#available-widgets .widget.ui-draggable-dragging .widget-top {
cursor: move;
}
/* =Media Queries
-------------------------------------------------------------- */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -18,9 +18,11 @@ if ( ! current_user_can( 'customize' ) ) {
wp_reset_vars( array( 'url', 'return' ) );
$url = wp_unslash( $url );
$url = esc_url_raw( $url );
$url = wp_validate_redirect( $url, home_url( '/' ) );
if ( $return ) {
$return = wp_unslash( $return );
$return = esc_url_raw( $return );
$return = wp_validate_redirect( $return );
}
if ( ! $return ) {

View File

@@ -1540,10 +1540,12 @@ function wp_ajax_inline_save() {
$data['parent_id'] = $data['post_parent'];
// Status.
if ( isset($data['keep_private']) && 'private' == $data['keep_private'] )
if ( isset( $data['keep_private'] ) && 'private' == $data['keep_private'] ) {
$data['visibility'] = 'private';
$data['post_status'] = 'private';
else
} else {
$data['post_status'] = $data['_status'];
}
if ( empty($data['comment_status']) )
$data['comment_status'] = 'closed';
@@ -2601,7 +2603,7 @@ function wp_ajax_get_revision_diffs() {
if ( ! $post = get_post( (int) $_REQUEST['post_id'] ) )
wp_send_json_error();
if ( ! current_user_can( 'read_post', $post->ID ) )
if ( ! current_user_can( 'edit_post', $post->ID ) )
wp_send_json_error();
// Really just pre-loading the cache here.
@@ -2883,6 +2885,8 @@ function wp_ajax_destroy_sessions() {
* @see Plugin_Upgrader
*/
function wp_ajax_update_plugin() {
global $wp_filesystem;
$plugin = urldecode( $_POST['plugin'] );
$status = array(
@@ -2892,6 +2896,7 @@ function wp_ajax_update_plugin() {
'oldVersion' => '',
'newVersion' => '',
);
$plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
if ( $plugin_data['Version'] ) {
$status['oldVersion'] = sprintf( __( 'Version %s' ), $plugin_data['Version'] );
@@ -2906,15 +2911,17 @@ function wp_ajax_update_plugin() {
include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
$current = get_site_transient( 'update_plugins' );
if ( empty( $current ) ) {
wp_update_plugins();
}
wp_update_plugins();
$upgrader = new Plugin_Upgrader( new Automatic_Upgrader_Skin() );
$skin = new Automatic_Upgrader_Skin();
$upgrader = new Plugin_Upgrader( $skin );
$result = $upgrader->bulk_upgrade( array( $plugin ) );
if ( is_array( $result ) ) {
if ( is_array( $result ) && empty( $result[$plugin] ) && is_wp_error( $skin->result ) ) {
$result = $skin->result;
}
if ( is_array( $result ) && !empty( $result[ $plugin ] ) ) {
$plugin_update_data = current( $result );
/*
@@ -2929,7 +2936,8 @@ function wp_ajax_update_plugin() {
wp_send_json_error( $status );
}
$plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
$plugin_data = get_plugins( '/' . $result[ $plugin ]['destination_name'] );
$plugin_data = reset( $plugin_data );
if ( $plugin_data['Version'] ) {
$status['newVersion'] = sprintf( __( 'Version %s' ), $plugin_data['Version'] );
@@ -2939,10 +2947,18 @@ function wp_ajax_update_plugin() {
} else if ( is_wp_error( $result ) ) {
$status['error'] = $result->get_error_message();
wp_send_json_error( $status );
} else if ( is_bool( $result ) && ! $result ) {
} else if ( is_bool( $result ) && ! $result ) {
$status['errorCode'] = 'unable_to_connect_to_filesystem';
$status['error'] = __( 'Unable to connect to the filesystem. Please confirm your credentials.' );
// Pass through the error from WP_Filesystem if one was raised
if ( is_wp_error( $wp_filesystem->errors ) && $wp_filesystem->errors->get_error_code() ) {
$status['error'] = $wp_filesystem->errors->get_error_message();
}
wp_send_json_error( $status );
}
}

View File

@@ -341,7 +341,7 @@ foreach ( $columns as $column_name => $column_display_name ) {
<?php echo $att_title; ?></a>
<?php };
_media_states( $post ); ?></strong>
<p class="filename"><?php echo wp_basename( $post->guid ); ?></p>
<p class="filename"><?php echo esc_html( wp_basename( $post->guid ) ); ?></p>
<?php
echo $this->row_actions( $this->_get_row_actions( $post, $att_title ) );
?>

View File

@@ -224,7 +224,7 @@ class WP_MS_Users_List_Table extends WP_List_Table {
break;
case 'email':
echo "<td $attributes><a href='mailto:$user->user_email'>$user->user_email</a></td>";
echo "<td $attributes><a href='" . esc_url( "mailto:$user->user_email" ) . "'>$user->user_email</a></td>";
break;
case 'registered':

View File

@@ -750,8 +750,9 @@ class WP_Posts_List_Table extends WP_List_Table {
echo '<div class="locked-info"><span class="locked-avatar">' . $locked_avatar . '</span> <span class="locked-text">' . $locked_text . "</span></div>\n";
}
if ( ! $this->hierarchical_display && 'excerpt' == $mode && current_user_can( 'read_post', $post->ID ) )
the_excerpt();
if ( ! $this->hierarchical_display && 'excerpt' == $mode && current_user_can( 'read_post', $post->ID ) ) {
echo esc_html( get_the_excerpt() );
}
$actions = array();
if ( $can_edit_post && 'trash' != $post->post_status ) {

View File

@@ -119,10 +119,28 @@ class WP_Press_This {
'post_type' => 'post',
'post_status' => 'draft',
'post_format' => ( ! empty( $_POST['post_format'] ) ) ? sanitize_text_field( $_POST['post_format'] ) : '',
'tax_input' => ( ! empty( $_POST['tax_input'] ) ) ? $_POST['tax_input'] : array(),
'post_category' => ( ! empty( $_POST['post_category'] ) ) ? $_POST['post_category'] : array(),
);
// Only accept categories if the user actually can assign
$category_tax = get_taxonomy( 'category' );
if ( current_user_can( $category_tax->cap->assign_terms ) ) {
$post_data['post_category'] = ( ! empty( $_POST['post_category'] ) ) ? $_POST['post_category'] : array();
}
// Only accept taxonomies if the user can actually assign
if ( ! empty( $_POST['tax_input'] ) ) {
$tax_input = $_POST['tax_input'];
foreach ( $tax_input as $tax => $_ti ) {
$tax_object = get_taxonomy( $tax );
if ( ! $tax_object || ! current_user_can( $tax_object->cap->assign_terms ) ) {
unset( $tax_input[ $tax ] );
}
}
$post_data['tax_input'] = $tax_input;
}
// Toggle status to pending if user cannot actually publish
if ( ! empty( $_POST['post_status'] ) && 'publish' === $_POST['post_status'] ) {
if ( current_user_can( 'publish_posts' ) ) {
$post['post_status'] = 'publish';
@@ -433,7 +451,7 @@ class WP_Press_This {
* @since 4.2.0
*
* @param string $src Embed source URL.
* @return string If not from a supported provider, an empty string. Otherwise, a reformattd embed URL.
* @return string If not from a supported provider, an empty string. Otherwise, a reformatted embed URL.
*/
private function _limit_embed( $src ) {
$src = $this->_limit_url( $src );
@@ -679,7 +697,11 @@ class WP_Press_This {
* making PT fully backward compatible with the older bookmarklet.
*/
if ( empty( $_POST ) && ! empty( $data['u'] ) ) {
$data = $this->source_data_fetch_fallback( $data['u'], $data );
if ( isset( $_GET['_wpnonce'] ) && wp_verify_nonce( $_GET['_wpnonce'], 'scan-site' ) ) {
$data = $this->source_data_fetch_fallback( $data['u'], $data );
} else {
$data['errors'] = 'missing nonce';
}
} else {
foreach ( array( '_images', '_embeds' ) as $type ) {
if ( empty( $_POST[ $type ] ) ) {
@@ -823,6 +845,12 @@ class WP_Press_This {
public function categories_html( $post ) {
$taxonomy = get_taxonomy( 'category' );
// Bail if user cannot assign terms
if ( ! current_user_can( $taxonomy->cap->assign_terms ) ) {
return;
}
// Only show "add" if user can edit terms
if ( current_user_can( $taxonomy->cap->edit_terms ) ) {
?>
<button type="button" class="add-cat-toggle button-subtle" aria-expanded="false">
@@ -1173,7 +1201,7 @@ class WP_Press_This {
$site_data = array(
'v' => ! empty( $data['v'] ) ? $data['v'] : '',
'u' => ! empty( $data['u'] ) ? $data['u'] : '',
'hasData' => ! empty( $data ),
'hasData' => ! empty( $data ) && ! isset( $data['errors'] ),
);
if ( ! empty( $images ) ) {
@@ -1234,6 +1262,12 @@ class WP_Press_This {
wp_enqueue_script( 'json2' );
wp_enqueue_script( 'editor' );
$categories_tax = get_taxonomy( 'category' );
$show_categories = current_user_can( $categories_tax->cap->assign_terms ) || current_user_can( $categories_tax->cap->edit_terms );
$tag_tax = get_taxonomy( 'post_tag' );
$show_tags = current_user_can( $tag_tax->cap->assign_terms );
$supports_formats = false;
$post_format = 0;
@@ -1299,8 +1333,9 @@ class WP_Press_This {
<div id="scanbar" class="scan">
<form method="GET">
<label for="url-scan" class="screen-reader-text"><?php _e( 'Scan site for content' ); ?></label>
<input type="url" name="u" id="url-scan" class="scan-url" value="" placeholder="<?php esc_attr_e( 'Enter a URL to scan' ) ?>" />
<input type="url" name="u" id="url-scan" class="scan-url" value="<?php echo esc_attr( $site_data['u'] ) ?>" placeholder="<?php esc_attr_e( 'Enter a URL to scan' ) ?>" />
<input type="submit" name="url-scan-submit" id="url-scan-submit" class="scan-submit" value="<?php esc_attr_e( 'Scan' ) ?>" />
<?php wp_nonce_field( 'scan-site' ); ?>
</form>
</div>
@@ -1382,17 +1417,21 @@ class WP_Press_This {
</button>
<?php endif; ?>
<button type="button" class="button-reset post-option">
<span class="dashicons dashicons-category"></span>
<span class="post-option-title"><?php _e( 'Categories' ); ?></span>
<span class="dashicons post-option-forward"></span>
</button>
<?php if ( $show_categories ) : ?>
<button type="button" class="button-reset post-option">
<span class="dashicons dashicons-category"></span>
<span class="post-option-title"><?php _e( 'Categories' ); ?></span>
<span class="dashicons post-option-forward"></span>
</button>
<?php endif; ?>
<button type="button" class="button-reset post-option">
<span class="dashicons dashicons-tag"></span>
<span class="post-option-title"><?php _e( 'Tags' ); ?></span>
<span class="dashicons post-option-forward"></span>
</button>
<?php if ( $show_tags ) : ?>
<button type="button" class="button-reset post-option">
<span class="dashicons dashicons-tag"></span>
<span class="post-option-title"><?php _e( 'Tags' ); ?></span>
<span class="dashicons post-option-forward"></span>
</button>
<?php endif; ?>
</div>
<?php if ( $supports_formats ) : ?>
@@ -1406,23 +1445,27 @@ class WP_Press_This {
</div>
<?php endif; ?>
<div class="setting-modal is-off-screen is-hidden">
<button type="button" class="button-reset modal-close">
<span class="dashicons post-option-back"></span>
<span class="setting-title" aria-hidden="true"><?php _e( 'Categories' ); ?></span>
<span class="screen-reader-text"><?php _e( 'Back to post options' ) ?></span>
</button>
<?php $this->categories_html( $post ); ?>
</div>
<?php if ( $show_categories ) : ?>
<div class="setting-modal is-off-screen is-hidden">
<button type="button" class="button-reset modal-close">
<span class="dashicons post-option-back"></span>
<span class="setting-title" aria-hidden="true"><?php _e( 'Categories' ); ?></span>
<span class="screen-reader-text"><?php _e( 'Back to post options' ) ?></span>
</button>
<?php $this->categories_html( $post ); ?>
</div>
<?php endif; ?>
<div class="setting-modal tags is-off-screen is-hidden">
<button type="button" class="button-reset modal-close">
<span class="dashicons post-option-back"></span>
<span class="setting-title" aria-hidden="true"><?php _e( 'Tags' ); ?></span>
<span class="screen-reader-text"><?php _e( 'Back to post options' ) ?></span>
</button>
<?php $this->tags_html( $post ); ?>
</div>
<?php if ( $show_tags ) : ?>
<div class="setting-modal tags is-off-screen is-hidden">
<button type="button" class="button-reset modal-close">
<span class="dashicons post-option-back"></span>
<span class="setting-title" aria-hidden="true"><?php _e( 'Tags' ); ?></span>
<span class="screen-reader-text"><?php _e( 'Back to post options' ) ?></span>
</button>
<?php $this->tags_html( $post ); ?>
</div>
<?php endif; ?>
</div><!-- .options-panel -->
</div><!-- .wrapper -->

View File

@@ -972,11 +972,14 @@ class Plugin_Upgrader extends WP_Upgrader {
// Check the folder contains at least 1 valid plugin.
$plugins_found = false;
foreach ( glob( $working_directory . '*.php' ) as $file ) {
$info = get_plugin_data($file, false, false);
if ( !empty( $info['Name'] ) ) {
$plugins_found = true;
break;
$files = glob( $working_directory . '*.php' );
if ( $files ) {
foreach ( $files as $file ) {
$info = get_plugin_data( $file, false, false );
if ( ! empty( $info['Name'] ) ) {
$plugins_found = true;
break;
}
}
}
@@ -2327,8 +2330,12 @@ class File_Upload_Upgrader {
if ( ! ( ( $uploads = wp_upload_dir() ) && false === $uploads['error'] ) )
wp_die( $uploads['error'] );
$this->filename = $_GET[$urlholder];
$this->filename = sanitize_file_name( $_GET[ $urlholder ] );
$this->package = $uploads['basedir'] . '/' . $this->filename;
if ( 0 !== strpos( realpath( $this->package ), realpath( $uploads['basedir'] ) ) ) {
wp_die( __( 'Please select a file' ) );
}
}
}

View File

@@ -420,7 +420,7 @@ class WP_Users_List_Table extends WP_List_Table {
$r .= "<td $attributes>$user_object->first_name $user_object->last_name</td>";
break;
case 'email':
$r .= "<td $attributes><a href='mailto:$email' title='" . esc_attr( sprintf( __( 'E-mail: %s' ), $email ) ) . "'>$email</a></td>";
$r .= "<td $attributes><a href='" . esc_url( "mailto:$email" ) . "' title='" . esc_attr( sprintf( __( 'E-mail: %s' ), $email ) ) . "'>$email</a></td>";
break;
case 'role':
$r .= "<td $attributes>$role_name</td>";

View File

@@ -418,6 +418,10 @@ function wp_network_dashboard_right_now() {
function wp_dashboard_quick_press( $error_msg = false ) {
global $post_ID;
if ( ! current_user_can( 'edit_posts' ) ) {
return;
}
/* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
$last_post_id = (int) get_user_option( 'dashboard_quick_press_last_post_id' ); // Get the last post_ID
if ( $last_post_id ) {

View File

@@ -146,7 +146,7 @@ function wp_tempnam( $filename = '', $dir = '' ) {
$dir = get_temp_dir();
}
if ( empty( $filename ) || '.' == $filename ) {
if ( empty( $filename ) || '.' == $filename || '/' == $filename ) {
$filename = time();
}

View File

@@ -278,7 +278,7 @@ function media_handle_upload($file_id, $post_id, $post_data = array(), $override
$url = $file['url'];
$type = $file['type'];
$file = $file['file'];
$title = $name;
$title = sanitize_text_field( $name );
$content = '';
$excerpt = '';
@@ -2896,7 +2896,7 @@ function wp_add_id3_tag_data( &$metadata, $data ) {
if ( ! empty( $data[$version]['comments'] ) ) {
foreach ( $data[$version]['comments'] as $key => $list ) {
if ( 'length' !== $key && ! empty( $list ) ) {
$metadata[$key] = reset( $list );
$metadata[$key] = wp_kses_post( reset( $list ) );
// Fix bug in byte stream analysis.
if ( 'terms_of_use' === $key && 0 === strpos( $metadata[$key], 'yright notice.' ) )
$metadata[$key] = 'Cop' . $metadata[$key];

View File

@@ -165,6 +165,13 @@ function _wp_translate_postdata( $update = false, $post_data = null ) {
$post_data['post_date_gmt'] = get_gmt_from_date( $post_data['post_date'] );
}
if ( isset( $post_data['post_category'] ) ) {
$category_object = get_taxonomy( 'category' );
if ( ! current_user_can( $category_object->cap->assign_terms ) ) {
unset( $post_data['post_category'] );
}
}
return $post_data;
}
@@ -1292,15 +1299,15 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
}
}
$post_name_html = '<span id="editable-post-name" title="' . $title . '">' . $post_name_abridged . '</span>';
$display_link = str_replace( array( '%pagename%', '%postname%' ), $post_name_html, urldecode( $permalink ) );
$post_name_html = '<span id="editable-post-name" title="' . $title . '">' . esc_html( $post_name_abridged ) . '</span>';
$display_link = str_replace( array( '%pagename%', '%postname%' ), $post_name_html, esc_html( urldecode( $permalink ) ) );
$pretty_permalink = str_replace( array( '%pagename%', '%postname%' ), $post_name, urldecode( $permalink ) );
$return = '<strong>' . __( 'Permalink:' ) . "</strong>\n";
$return .= '<span id="sample-permalink" tabindex="-1">' . $display_link . "</span>\n";
$return .= '&lrm;'; // Fix bi-directional text display defect in RTL languages.
$return .= '<span id="edit-slug-buttons"><a href="#post_name" class="edit-slug button button-small hide-if-no-js" onclick="editPermalink(' . $id . '); return false;">' . __( 'Edit' ) . "</a></span>\n";
$return .= '<span id="editable-post-name-full">' . $post_name . "</span>\n";
$return .= '<span id="editable-post-name-full">' . esc_html( $post_name ) . "</span>\n";
}
if ( isset( $view_post ) ) {
@@ -1314,7 +1321,7 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
$pretty_permalink = $permalink;
}
$return .= "<span id='view-post-btn'><a href='" . $pretty_permalink . "' class='button button-small'>$view_post</a></span>\n";
$return .= "<span id='view-post-btn'><a href='" . esc_url( $pretty_permalink ) . "' class='button button-small'>$view_post</a></span>\n";
}
}
@@ -1542,7 +1549,7 @@ function _admin_notice_post_locked() {
// Allow plugins to prevent some users overriding the post lock
if ( $override ) {
?>
<a class="button button-primary wp-tab-last" href="<?php echo esc_url( add_query_arg( 'get-post-lock', '1', get_edit_post_link( $post->ID, 'url' ) ) ); ?>"><?php _e('Take over'); ?></a>
<a class="button button-primary wp-tab-last" href="<?php echo esc_url( add_query_arg( 'get-post-lock', '1', wp_nonce_url( get_edit_post_link( $post->ID, 'url' ), 'lock-post_' . $post->ID ) ) ); ?>"><?php _e('Take over'); ?></a>
<?php
}

View File

@@ -971,7 +971,8 @@ final class WP_Screen {
switch ( $this->base ) {
case 'widgets':
$this->_screen_settings = '<p><a id="access-on" href="widgets.php?widgets-access=on">' . __('Enable accessibility mode') . '</a><a id="access-off" href="widgets.php?widgets-access=off">' . __('Disable accessibility mode') . "</a></p>\n";
$nonce = wp_create_nonce( 'widgets-access' );
$this->_screen_settings = '<p><a id="access-on" href="widgets.php?widgets-access=on&_wpnonce=' . urlencode( $nonce ) . '">' . __('Enable accessibility mode') . '</a><a id="access-off" href="widgets.php?widgets-access=off&_wpnonce=' . urlencode( $nonce ) . '">' . __('Disable accessibility mode') . "</a></p>\n";
break;
case 'post' :
$expand = '<div class="editor-expand hidden"><label for="editor-expand-toggle">';

View File

@@ -1050,6 +1050,9 @@ function update_core($from, $to) {
$wp_filesystem->delete($old_file, true);
}
// Remove any Genericons example.html's from the filesystem
_upgrade_422_remove_genericons();
// Upgrade DB with separate request
/** This filter is documented in wp-admin/includes/update-core.php */
apply_filters( 'update_feedback', __( 'Upgrading database&#8230;' ) );
@@ -1188,3 +1191,70 @@ window.location = 'about.php?updated';
exit();
}
add_action( '_core_updated_successfully', '_redirect_to_about_wordpress' );
/**
* Cleans up Genericons example files.
*
* @since 4.2.2
*/
function _upgrade_422_remove_genericons() {
global $wp_theme_directories, $wp_filesystem;
// A list of the affected files using the filesystem absolute paths.
$affected_files = array();
// Themes
foreach ( $wp_theme_directories as $directory ) {
$affected_theme_files = _upgrade_422_find_genericons_files_in_folder( $directory );
$affected_files = array_merge( $affected_files, $affected_theme_files );
}
// Plugins
$affected_plugin_files = _upgrade_422_find_genericons_files_in_folder( WP_PLUGIN_DIR );
$affected_files = array_merge( $affected_files, $affected_plugin_files );
foreach ( $affected_files as $file ) {
$gen_dir = $wp_filesystem->find_folder( trailingslashit( dirname( $file ) ) );
if ( empty( $gen_dir ) ) {
continue;
}
// The path when the file is accessed via WP_Filesystem may differ in the case of FTP
$remote_file = $gen_dir . basename( $file );
if ( ! $wp_filesystem->exists( $remote_file ) ) {
continue;
}
if ( ! $wp_filesystem->delete( $remote_file, false, 'f' ) ) {
$wp_filesystem->put_contents( $remote_file, '' );
}
}
}
/**
* Recursively find Genericons example files in a given folder.
*
* @ignore
* @since 4.2.2
*
* @param string $directory Directory path. Expects trailingslashed.
* @return array
*/
function _upgrade_422_find_genericons_files_in_folder( $directory ) {
$directory = trailingslashit( $directory );
$files = array();
if ( file_exists( "{$directory}example.html" ) && false !== strpos( file_get_contents( "{$directory}example.html" ), '<title>Genericons</title>' ) ) {
$files[] = "{$directory}example.html";
}
$dirs = glob( $directory . '*', GLOB_ONLYDIR );
if ( $dirs ) {
foreach ( $dirs as $dir ) {
$files = array_merge( $files, _upgrade_422_find_genericons_files_in_folder( $dir ) );
}
}
return $files;
}

View File

@@ -524,8 +524,11 @@ function upgrade_all() {
if ( $wp_current_db_version < 29630 )
upgrade_400();
if ( $wp_current_db_version < 31351 )
upgrade_420();
if ( $wp_current_db_version < 31534 )
upgrade_422();
if ( $wp_current_db_version < 31536 )
upgrade_423();
maybe_disable_link_manager();
@@ -1420,13 +1423,81 @@ function upgrade_400() {
* @since 4.2.0
*/
function upgrade_420() {
}
/**
* Execute changes made in WordPress 4.2.1.
*
* @since 4.2.1
*/
function upgrade_421() {
}
/**
* Execute changes made in WordPress 4.2.2.
*
* @since 4.2.2
*/
function upgrade_422() {
global $wp_current_db_version, $wpdb;
if ( $wp_current_db_version < 31351 && $wpdb->charset === 'utf8mb4' ) {
if ( $wp_current_db_version < 31534 ) {
$content_length = $wpdb->get_col_length( $wpdb->comments, 'comment_content' );
if ( is_wp_error( $content_length ) ) {
return;
}
if ( false === $content_length ) {
$content_length = array(
'type' => 'byte',
'length' => 65535,
);
} elseif ( ! is_array( $content_length ) ) {
$length = (int) $content_length > 0 ? (int) $content_length : 65535;
$content_length = array(
'type' => 'byte',
'length' => $length
);
}
if ( 'byte' !== $content_length['type'] || 0 === $content_length['length'] ) {
// Sites with malformed DB schemas are on their own.
return;
}
$allowed_length = intval( $content_length['length'] ) - 10;
$comments = $wpdb->get_results(
"SELECT `comment_ID` FROM `{$wpdb->comments}`
WHERE `comment_date_gmt` > '2015-04-26'
AND LENGTH( `comment_content` ) >= {$allowed_length}
AND ( `comment_content` LIKE '%<%' OR `comment_content` LIKE '%>%' )"
);
foreach ( $comments as $comment ) {
wp_delete_comment( $comment->comment_ID, true );
}
}
}
/**
* Execute changes made in WordPress 4.2.0.
*
* @since 4.2.3
*/
function upgrade_423() {
global $wp_current_db_version, $wpdb;
if ( $wp_current_db_version < 31536 && $wpdb->charset === 'utf8mb4' ) {
if ( is_multisite() ) {
$tables = $wpdb->tables( 'blog' );
} else {
$tables = $wpdb->tables( 'all' );
if ( defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) {
$global_tables = $wpdb->tables( 'global' );
$tables = array_diff_assoc( $tables, $global_tables );
}
}
foreach ( $tables as $table ) {
@@ -1534,11 +1605,11 @@ function upgrade_network() {
// 4.2
if ( $wp_current_db_version < 31351 && $wpdb->charset === 'utf8mb4' ) {
if ( ! ( defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) && DO_NOT_UPGRADE_GLOBAL_TABLES ) ) {
if ( ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) {
$wpdb->query( "ALTER TABLE $wpdb->usermeta DROP INDEX meta_key, ADD INDEX meta_key(meta_key(191))" );
$wpdb->query( "ALTER TABLE $wpdb->site DROP INDEX domain, ADD INDEX domain(domain(140),path(51))" );
$wpdb->query( "ALTER TABLE $wpdb->sitemeta DROP INDEX meta_key, ADD INDEX meta_key(meta_key(191))" );
$wpdb->query( "ALTER TABLE $wpdb->signups DROP INDEX domain, ADD INDEX domain(domain(140),path(51))" );
$wpdb->query( "ALTER TABLE $wpdb->signups DROP INDEX domain_path, ADD INDEX domain_path(domain(140),path(51))" );
$tables = $wpdb->tables( 'global' );
@@ -1547,6 +1618,35 @@ function upgrade_network() {
}
}
}
// 4.2.2
if ( $wp_current_db_version < 31535 && 'utf8mb4' === $wpdb->charset ) {
if ( ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) {
$upgrade = false;
$indexes = $wpdb->get_results( "SHOW INDEXES FROM $wpdb->signups" );
foreach( $indexes as $index ) {
if ( 'domain_path' == $index->Key_name && 'domain' == $index->Column_name && 140 != $index->Sub_part ) {
$upgrade = true;
break;
}
}
if ( $upgrade ) {
$wpdb->query( "ALTER TABLE $wpdb->signups DROP INDEX domain_path, ADD INDEX domain_path(domain(140),path(51))" );
}
}
}
// 4.2.3
if ( $wp_current_db_version < 31536 && $wpdb->charset === 'utf8mb4' ) {
if ( ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) {
$tables = $wpdb->tables( 'global' );
foreach ( $tables as $table ) {
maybe_convert_table_to_utf8mb4( $table );
}
}
}
}
//
@@ -1679,6 +1779,17 @@ function maybe_convert_table_to_utf8mb4( $table ) {
}
}
$table_details = $wpdb->get_row( "SHOW TABLE STATUS LIKE '$table'" );
if ( ! $table_details ) {
return false;
}
list( $table_charset ) = explode( '_', $table_details->Collation );
$table_charset = strtolower( $table_charset );
if ( 'utf8mb4' === $table_charset ) {
return true;
}
return $wpdb->query( "ALTER TABLE $table CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci" );
}
@@ -1838,6 +1949,9 @@ function dbDelta( $queries = '', $execute = true ) {
*/
$iqueries = apply_filters( 'dbdelta_insert_queries', $iqueries );
$text_fields = array( 'tinytext', 'text', 'mediumtext', 'longtext' );
$blob_fields = array( 'tinyblob', 'blob', 'mediumblob', 'longblob' );
$global_tables = $wpdb->tables( 'global' );
foreach ( $cqueries as $table => $qry ) {
// Upgrade global tables only for the main site. Don't upgrade at all if DO_NOT_UPGRADE_GLOBAL_TABLES is defined.
@@ -1907,9 +2021,24 @@ function dbDelta( $queries = '', $execute = true ) {
// Is actual field type different from the field type in query?
if ($tablefield->Type != $fieldtype) {
$do_change = true;
if ( in_array( strtolower( $fieldtype ), $text_fields ) && in_array( strtolower( $tablefield->Type ), $text_fields ) ) {
if ( array_search( strtolower( $fieldtype ), $text_fields ) < array_search( strtolower( $tablefield->Type ), $text_fields ) ) {
$do_change = false;
}
}
if ( in_array( strtolower( $fieldtype ), $blob_fields ) && in_array( strtolower( $tablefield->Type ), $blob_fields ) ) {
if ( array_search( strtolower( $fieldtype ), $blob_fields ) < array_search( strtolower( $tablefield->Type ), $blob_fields ) ) {
$do_change = false;
}
}
if ( $do_change ) {
// Add a query to change the column type
$cqueries[] = "ALTER TABLE {$table} CHANGE COLUMN {$tablefield->Field} " . $cfields[strtolower($tablefield->Field)];
$for_update[$table.'.'.$tablefield->Field] = "Changed type of {$table}.{$tablefield->Field} from {$tablefield->Type} to {$fieldtype}";
$cqueries[] = "ALTER TABLE {$table} CHANGE COLUMN {$tablefield->Field} " . $cfields[strtolower($tablefield->Field)];
$for_update[$table.'.'.$tablefield->Field] = "Changed type of {$table}.{$tablefield->Field} from {$tablefield->Type} to {$fieldtype}";
}
}
// Get the default value from the array
@@ -2366,14 +2495,9 @@ function pre_schema_upgrade() {
}
}
if ( $wp_current_db_version < 30133 ) {
// dbDelta() can recreate but can't drop the index.
$wpdb->query( "ALTER TABLE $wpdb->terms DROP INDEX slug" );
}
// Upgrade versions prior to 4.2.
if ( $wp_current_db_version < 31351 ) {
if ( ! is_multisite() ) {
if ( ! is_multisite() && ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) {
$wpdb->query( "ALTER TABLE $wpdb->usermeta DROP INDEX meta_key, ADD INDEX meta_key(meta_key(191))" );
}
$wpdb->query( "ALTER TABLE $wpdb->terms DROP INDEX slug, ADD INDEX slug(slug(191))" );

View File

@@ -860,7 +860,7 @@ $(document).ready( function() {
window.wpResponsive.init();
setPinMenu();
$document.on( 'wp-window-resized.pin-menu postboxes-columnchange.pin-menu postbox-toggled.pin-menu wp-collapse-menu.pin-menu wp-scroll-start.pin-menu', setPinMenu );
$document.on( 'wp-pin-menu wp-window-resized.pin-menu postboxes-columnchange.pin-menu postbox-toggled.pin-menu wp-collapse-menu.pin-menu wp-scroll-start.pin-menu', setPinMenu );
});
// Fire a custom jQuery event at the end of window resize

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -124,7 +124,7 @@ jQuery(document).ready( function($) {
};
quickPressLoad();
$( '.meta-box-sortables' ).sortable( 'option', 'containment', 'document' );
$( '.meta-box-sortables' ).sortable( 'option', 'containment', '#wpwrap' );
function autoResizeTextarea() {
if ( document.documentMode && document.documentMode < 9 ) {

View File

@@ -1 +1 @@
var ajaxWidgets,ajaxPopulateWidgets,quickPressLoad;jQuery(document).ready(function(a){function b(){if(!(document.documentMode&&document.documentMode<9)){a("body").append('<div class="quick-draft-textarea-clone" style="display: none;"></div>');var b=a(".quick-draft-textarea-clone"),c=a("#content"),d=c.height(),e=a(window).height()-100;b.css({"font-family":c.css("font-family"),"font-size":c.css("font-size"),"line-height":c.css("line-height"),"padding-bottom":c.css("paddingBottom"),"padding-left":c.css("paddingLeft"),"padding-right":c.css("paddingRight"),"padding-top":c.css("paddingTop"),"white-space":"pre-wrap","word-wrap":"break-word",display:"none"}),c.on("focus input propertychange",function(){var f=a(this),g=f.val()+"&nbsp;",h=b.css("width",f.css("width")).text(g).outerHeight()+2;c.css("overflow-y","auto"),h===d||h>=e&&d>=e||(d=h>e?e:h,c.css("overflow","hidden"),f.css("height",d+"px"))})}}var c,d=a("#welcome-panel"),e=a("#wp_welcome_panel-hide");c=function(b){a.post(ajaxurl,{action:"update-welcome-panel",visible:b,welcomepanelnonce:a("#welcomepanelnonce").val()})},d.hasClass("hidden")&&e.prop("checked")&&d.removeClass("hidden"),a(".welcome-panel-close, .welcome-panel-dismiss a",d).click(function(b){b.preventDefault(),d.addClass("hidden"),c(0),a("#wp_welcome_panel-hide").prop("checked",!1)}),e.click(function(){d.toggleClass("hidden",!this.checked),c(this.checked?1:0)}),ajaxWidgets=["dashboard_primary"],ajaxPopulateWidgets=function(b){function c(b,c){var d,e=a("#"+c+" div.inside:visible").find(".widget-loading");e.length&&(d=e.parent(),setTimeout(function(){d.load(ajaxurl+"?action=dashboard-widgets&widget="+c+"&pagenow="+pagenow,"",function(){d.hide().slideDown("normal",function(){a(this).css("display","")})})},500*b))}b?(b=b.toString(),-1!==a.inArray(b,ajaxWidgets)&&c(0,b)):a.each(ajaxWidgets,c)},ajaxPopulateWidgets(),postboxes.add_postbox_toggles(pagenow,{pbshow:ajaxPopulateWidgets}),quickPressLoad=function(){var c,d=a("#quickpost-action");a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!1),c=a("#quick-press").submit(function(){function b(){var b=a(".drafts ul li").first();b.css("background","#fffbe5"),setTimeout(function(){b.css("background","none")},1e3)}return a("#dashboard_quick_press #publishing-action .spinner").show(),a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!0),a.post(c.attr("action"),c.serializeArray(),function(c){a("#dashboard_quick_press .inside").html(c),a("#quick-press").removeClass("initial-form"),quickPressLoad(),b(),a("#title").focus()}),!1}),a("#publish").click(function(){d.val("post-quickpress-publish")}),a("#title, #tags-input, #content").each(function(){var b=a(this),c=a("#"+this.id+"-prompt-text");""===this.value&&c.removeClass("screen-reader-text"),c.click(function(){a(this).addClass("screen-reader-text"),b.focus()}),b.blur(function(){""===this.value&&c.removeClass("screen-reader-text")}),b.focus(function(){c.addClass("screen-reader-text")})}),a("#quick-press").on("click focusin",function(){wpActiveEditor="content"}),b()},quickPressLoad(),a(".meta-box-sortables").sortable("option","containment","document")});
var ajaxWidgets,ajaxPopulateWidgets,quickPressLoad;jQuery(document).ready(function(a){function b(){if(!(document.documentMode&&document.documentMode<9)){a("body").append('<div class="quick-draft-textarea-clone" style="display: none;"></div>');var b=a(".quick-draft-textarea-clone"),c=a("#content"),d=c.height(),e=a(window).height()-100;b.css({"font-family":c.css("font-family"),"font-size":c.css("font-size"),"line-height":c.css("line-height"),"padding-bottom":c.css("paddingBottom"),"padding-left":c.css("paddingLeft"),"padding-right":c.css("paddingRight"),"padding-top":c.css("paddingTop"),"white-space":"pre-wrap","word-wrap":"break-word",display:"none"}),c.on("focus input propertychange",function(){var f=a(this),g=f.val()+"&nbsp;",h=b.css("width",f.css("width")).text(g).outerHeight()+2;c.css("overflow-y","auto"),h===d||h>=e&&d>=e||(d=h>e?e:h,c.css("overflow","hidden"),f.css("height",d+"px"))})}}var c,d=a("#welcome-panel"),e=a("#wp_welcome_panel-hide");c=function(b){a.post(ajaxurl,{action:"update-welcome-panel",visible:b,welcomepanelnonce:a("#welcomepanelnonce").val()})},d.hasClass("hidden")&&e.prop("checked")&&d.removeClass("hidden"),a(".welcome-panel-close, .welcome-panel-dismiss a",d).click(function(b){b.preventDefault(),d.addClass("hidden"),c(0),a("#wp_welcome_panel-hide").prop("checked",!1)}),e.click(function(){d.toggleClass("hidden",!this.checked),c(this.checked?1:0)}),ajaxWidgets=["dashboard_primary"],ajaxPopulateWidgets=function(b){function c(b,c){var d,e=a("#"+c+" div.inside:visible").find(".widget-loading");e.length&&(d=e.parent(),setTimeout(function(){d.load(ajaxurl+"?action=dashboard-widgets&widget="+c+"&pagenow="+pagenow,"",function(){d.hide().slideDown("normal",function(){a(this).css("display","")})})},500*b))}b?(b=b.toString(),-1!==a.inArray(b,ajaxWidgets)&&c(0,b)):a.each(ajaxWidgets,c)},ajaxPopulateWidgets(),postboxes.add_postbox_toggles(pagenow,{pbshow:ajaxPopulateWidgets}),quickPressLoad=function(){var c,d=a("#quickpost-action");a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!1),c=a("#quick-press").submit(function(){function b(){var b=a(".drafts ul li").first();b.css("background","#fffbe5"),setTimeout(function(){b.css("background","none")},1e3)}return a("#dashboard_quick_press #publishing-action .spinner").show(),a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!0),a.post(c.attr("action"),c.serializeArray(),function(c){a("#dashboard_quick_press .inside").html(c),a("#quick-press").removeClass("initial-form"),quickPressLoad(),b(),a("#title").focus()}),!1}),a("#publish").click(function(){d.val("post-quickpress-publish")}),a("#title, #tags-input, #content").each(function(){var b=a(this),c=a("#"+this.id+"-prompt-text");""===this.value&&c.removeClass("screen-reader-text"),c.click(function(){a(this).addClass("screen-reader-text"),b.focus()}),b.blur(function(){""===this.value&&c.removeClass("screen-reader-text")}),b.focus(function(){c.addClass("screen-reader-text")})}),a("#quick-press").on("click focusin",function(){wpActiveEditor="content"}),b()},quickPressLoad(),a(".meta-box-sortables").sortable("option","containment","#wpwrap")});

View File

@@ -15,7 +15,7 @@
$visualEditor = $(),
$textTop = $( '#ed_toolbar' ),
$textEditor = $( '#content' ),
$textEditorClone = $( '<div id="content-textarea-clone"></div>' ),
$textEditorClone = $( '<div id="content-textarea-clone" class="wp-exclude-emoji"></div>' ),
$bottom = $( '#post-status-info' ),
$menuBar = $(),
$statusBar = $(),

File diff suppressed because one or more lines are too long

View File

@@ -492,7 +492,7 @@ var wpNavMenu;
title = menus.subMenuFocus.replace( '%1$s', itemName ).replace( '%2$d', itemPosition ).replace( '%3$s', parentItemName );
}
$this.prop('title', title).html( title );
$this.prop('title', title).text( title );
// Mark this item's accessibility as refreshed
$this.data( 'needs_accessibility_refresh', false );

File diff suppressed because one or more lines are too long

View File

@@ -250,7 +250,7 @@ window.wp = window.wp || {};
wp.updates.updateError = function( response ) {
var $message, name;
wp.updates.updateDoneSuccessfully = false;
if ( response.errorCode && response.errorCode == 'unable_to_connect_to_filesystem' ) {
if ( response.errorCode && response.errorCode == 'unable_to_connect_to_filesystem' && wp.updates.shouldRequestFilesystemCredentials ) {
wp.updates.credentialError( response, 'update-plugin' );
return;
}
@@ -263,10 +263,18 @@ window.wp = window.wp || {};
$message.attr( 'aria-label', wp.updates.l10n.updateFailedLabel.replace( '%s', name ) );
}
$message.removeClass( 'updating-message' );
$message.text( wp.updates.l10n.updateFailed );
$message.html( wp.updates.l10n.updateFailed + ': ' + response.error );
wp.a11y.speak( wp.updates.l10n.updateFailed );
/*
* The lock can be released since this failure was
* after the credentials form.
*/
wp.updates.updateLock = false;
$(document).trigger( 'wp-plugin-update-error', response );
wp.updates.queueChecker();
};
/**
@@ -467,6 +475,11 @@ window.wp = window.wp || {};
wp.updates.requestForCredentialsModalCancel();
});
// Hide SSH fields when not selected
$( '#request-filesystem-credentials-dialog input[name="connection_type"]' ).on( 'change', function() {
$( this ).parents( 'form' ).find( '#private_key, #public_key' ).parents( 'label' ).toggle( ( 'ssh' == $( this ).val() ) );
}).change();
// Click handler for plugin updates in List Table view.
$( '.plugin-update-tr' ).on( 'click', '.update-link', function( e ) {
e.preventDefault();
@@ -490,7 +503,6 @@ window.wp = window.wp || {};
wp.updates.updatePlugin( $button.data( 'plugin' ), $button.data( 'slug' ) );
} );
//
$( '#plugin_update_from_iframe' ).on( 'click' , function( e ) {
var target, data;

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,7 @@
/*global ajaxurl, isRtl */
var wpWidgets;
(function($) {
var $document = $( document );
wpWidgets = {
@@ -22,10 +23,13 @@ wpWidgets = {
} else {
$wrap.addClass('closed');
}
$document.triggerHandler( 'wp-pin-menu' );
});
$('#widgets-left .sidebar-name').click( function() {
$(this).closest('.widgets-holder-wrap').toggleClass('closed');
$document.triggerHandler( 'wp-pin-menu' );
});
$(document.body).bind('click.widgets-toggle', function(e) {
@@ -89,7 +93,7 @@ wpWidgets = {
distance: 2,
helper: 'clone',
zIndex: 100,
containment: 'document',
containment: '#wpwrap',
start: function( event, ui ) {
var chooser = $(this).find('.widgets-chooser');
@@ -119,7 +123,7 @@ wpWidgets = {
handle: '> .widget-top > .widget-title',
cursor: 'move',
distance: 2,
containment: 'document',
containment: '#wpwrap',
start: function( event, ui ) {
var height, $this = $(this),
$wrap = $this.parent(),
@@ -174,7 +178,7 @@ wpWidgets = {
wpWidgets.save( $widget, 0, 0, 1 );
$widget.find('input.add_new').val('');
$( document ).trigger( 'widget-added', [ $widget ] );
$document.trigger( 'widget-added', [ $widget ] );
}
$sidebar = $widget.parent();
@@ -381,7 +385,7 @@ wpWidgets = {
if ( r && r.length > 2 ) {
$( 'div.widget-content', widget ).html( r );
wpWidgets.appendTitle( widget );
$( document ).trigger( 'widget-updated', [ widget ] );
$document.trigger( 'widget-updated', [ widget ] );
}
}
if ( order ) {
@@ -446,7 +450,7 @@ wpWidgets = {
// No longer "new" widget
widget.find( 'input.add_new' ).val('');
$( document ).trigger( 'widget-added', [ widget ] );
$document.trigger( 'widget-added', [ widget ] );
/*
* Check if any part of the sidebar is visible in the viewport. If it is, don't scroll.
@@ -489,6 +493,6 @@ wpWidgets = {
}
};
$(document).ready( function(){ wpWidgets.init(); } );
$document.ready( function(){ wpWidgets.init(); } );
})(jQuery);

File diff suppressed because one or more lines are too long

View File

@@ -273,7 +273,7 @@ if ( isset( $_GET['updated'] ) ) {
<tr>
<th scope="row"><label for="first_comment_author"><?php _e( 'First Comment Author' ) ?></label></th>
<td>
<input type="text" size="40" name="first_comment_author" id="first_comment_author" aria-describedby="first-comment-author-desc" value="<?php echo get_site_option('first_comment_author') ?>" />
<input type="text" size="40" name="first_comment_author" id="first_comment_author" aria-describedby="first-comment-author-desc" value="<?php echo esc_attr( get_site_option('first_comment_author') ); ?>" />
<p class="description" id="first-comment-author-desc">
<?php _e( 'The author of the first comment on a new site.' ) ?>
</p>

View File

@@ -228,6 +228,14 @@ if ( $action ) {
exit;
}
// Bail on all if any paths are invalid.
// validate_file() returns truthy for invalid files
$invalid_plugin_files = array_filter( $plugins, 'validate_file' );
if ( $invalid_plugin_files ) {
wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
exit;
}
include(ABSPATH . 'wp-admin/update.php');
$parent_file = 'plugins.php';

View File

@@ -115,8 +115,9 @@ case 'post-quickdraft-save':
if ( ! wp_verify_nonce( $nonce, 'add-post' ) )
$error_msg = __( 'Unable to submit this form, please refresh and try again.' );
if ( ! current_user_can( 'edit_posts' ) )
$error_msg = __( 'Oops, you don&#8217;t have access to add new drafts.' );
if ( ! current_user_can( 'edit_posts' ) ) {
exit;
}
if ( $error_msg )
return wp_dashboard_quick_press( $error_msg );
@@ -159,6 +160,7 @@ case 'edit':
wp_die( __( 'You can&#8217;t edit this item because it is in the Trash. Please restore it and try again.' ) );
if ( ! empty( $_GET['get-post-lock'] ) ) {
check_admin_referer( 'lock-post_' . $post_id );
wp_set_post_lock( $post_id );
wp_redirect( get_edit_post_link( $post_id, 'url' ) );
exit();

View File

@@ -63,7 +63,7 @@ default :
if ( ! $post = get_post( $revision->post_parent ) )
break;
if ( ! current_user_can( 'read_post', $revision->ID ) || ! current_user_can( 'read_post', $post->ID ) )
if ( ! current_user_can( 'read_post', $revision->ID ) || ! current_user_can( 'edit_post', $revision->post_parent ) )
break;
// Revisions disabled and we're not looking at an autosave

View File

@@ -234,6 +234,8 @@ function list_plugin_updates() {
<tbody class="plugins">
<?php
foreach ( (array) $plugins as $plugin_file => $plugin_data) {
$plugin_data = (object) _get_plugin_data_markup_translate( $plugin_file, (array) $plugin_data, false, true );
$info = plugins_api('plugin_information', array('slug' => $plugin_data->update->slug ));
if ( is_wp_error( $info ) ) {
$info = false;

View File

@@ -99,7 +99,7 @@ if ( is_multisite()
// Execute confirmed email change. See send_confirmation_on_profile_email().
if ( is_multisite() && IS_PROFILE_PAGE && isset( $_GET[ 'newuseremail' ] ) && $current_user->ID ) {
$new_email = get_option( $current_user->ID . '_new_email' );
if ( $new_email[ 'hash' ] == $_GET[ 'newuseremail' ] ) {
if ( $new_email && hash_equals( $new_email[ 'hash' ], $_GET[ 'newuseremail' ] ) ) {
$user = new stdClass;
$user->ID = $current_user->ID;
$user->user_email = esc_html( trim( $new_email[ 'newemail' ] ) );
@@ -110,7 +110,8 @@ if ( is_multisite() && IS_PROFILE_PAGE && isset( $_GET[ 'newuseremail' ] ) && $c
wp_redirect( add_query_arg( array('updated' => 'true'), self_admin_url( 'profile.php' ) ) );
die();
}
} elseif ( is_multisite() && IS_PROFILE_PAGE && !empty( $_GET['dismiss'] ) && $current_user->ID . '_new_email' == $_GET['dismiss'] ) {
} elseif ( is_multisite() && IS_PROFILE_PAGE && !empty( $_GET['dismiss'] ) && $current_user->ID . '_new_email' === $_GET['dismiss'] ) {
check_admin_referer( 'dismiss-' . $current_user->ID . '_new_email' );
delete_option( $current_user->ID . '_new_email' );
wp_redirect( add_query_arg( array('updated' => 'true'), self_admin_url( 'profile.php' ) ) );
die();
@@ -402,7 +403,7 @@ if ( is_multisite() && is_network_admin() && ! IS_PROFILE_PAGE && current_user_c
$new_email = get_option( $current_user->ID . '_new_email' );
if ( $new_email && $new_email['newemail'] != $current_user->user_email && $profileuser->ID == $current_user->ID ) : ?>
<div class="updated inline">
<p><?php printf( __('There is a pending change of your e-mail to <code>%1$s</code>. <a href="%2$s">Cancel</a>'), $new_email['newemail'], esc_url( self_admin_url( 'profile.php?dismiss=' . $current_user->ID . '_new_email' ) ) ); ?></p>
<p><?php printf( __('There is a pending change of your e-mail to <code>%1$s</code>. <a href="%2$s">Cancel</a>'), esc_html( $new_email['newemail'] ), esc_url( wp_nonce_url( self_admin_url( 'profile.php?dismiss=' . $current_user->ID . '_new_email' ), 'dismiss-' . $current_user->ID . '_new_email' ) ) ); ?></p>
</div>
<?php endif; ?>
</td>

View File

@@ -17,6 +17,8 @@ if ( ! current_user_can('edit_theme_options') )
$widgets_access = get_user_setting( 'widgets_access' );
if ( isset($_GET['widgets-access']) ) {
check_admin_referer( 'widgets-access' );
$widgets_access = 'on' == $_GET['widgets-access'] ? 'on' : 'off';
set_user_setting( 'widgets_access', $widgets_access );
}

View File

@@ -1,719 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Genericons</title>
<link rel="stylesheet" href="genericons.css">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<style type="text/css">
/**
* Example page CSS
*/
body {
font-family: sans-serif;
line-height: 1.5;
margin: 0;
color: #2f2d2c;
background: #fff;
font-size: 11pt;
}
a {
color: #2f2d2c;
}
h4 {
margin-top: 40px;
}
#iconlist {
clear: both;
margin-bottom: 20px;
}
#iconlist div {
padding: 10px;
overflow: hidden;
white-space: nowrap;
font-size: 32px;
line-height: 1;
position: relative;
width: 32px;
height: 32px;
}
#iconlist div:before {
margin-right: 20px;
}
#iconlist div:hover {
cursor: pointer;
color: #e4c05c;
}
#primary {
background: #e4c05c;
overflow: hidden;
}
#content {
position: relative;
color: #fff;
max-width: 980px;
padding: 0 10px;
margin: 0 auto;
}
#icons {
background: #fbfbfb;
}
#icons #iconlist {
max-width: 980px;
box-sizing: border-box;
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
padding: 20px 0;
margin: 0 auto;
}
#glyph {
float: left;
width: 50%;
box-sizing: border-box;
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
-ms-box-sizing:border-box;
padding: 20px 0;
}
#glyph .info {
float: right;
width: 180px;
padding: 36px 0 0 0;
}
#glyph .info a {
color: #2f2d2c;
display: block;
padding: 8px 0 8px 15px;
}
#glyph .info strong {
font-weight: normal;
display: block;
padding: 8px 0;
}
#glyph .genericon {
font-size: 256px;
width: 256px;
height: 256px;
overflow: visible;
float: left;
}
.description {
margin-top: 50px;
width: 48%;
float: right;
padding-left: 40px;
margin-left: 2%;
box-sizing: border-box;
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
-ms-box-sizing:border-box;
background-size: 4px 4px;
}
#primary h2 {
color: white;
margin: 0 auto;
padding: 22px 0 0 20px;
max-width: 980px;
font-size: 2em;
}
#primary h2 span {
display: block;
font-weight: normal;
font-size: 12pt;
}
#footer {
clear: both;
max-width: 980px;
margin: 80px auto;
text-align: center;
text-transform: uppercase;
letter-spacing: .1em;
font-size: 7pt;
color: #ddd;
}
#footer a {
color: #ccc;
display: inline-block;
width: 150px;
overflow: hidden;
text-indent: 100%;
position: relative;
top: 2px;
opacity: .3;
background-repeat: no-repeat;
background-position: center top;
background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNi4wLjQsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iMTUwcHgiIGhlaWdodD0iMTRweCIgdmlld0JveD0iMTAgMCAxNTAgMTQiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMTAgMCAxNTAgMTQiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZmlsbD0iIzQ0NDQ0NCIgZD0iTTY1LjQzOCwxMi41Yy0zLjYyNiwwLTUuOTc2LTIuNjEyLTUuOTc2LTUuMzMxVjYuODMxYzAtMi43NjUsMi4zNTEtNS4zMyw1Ljk3Ni01LjMzDQoJCWMzLjY0MSwwLDUuOTksMi41NjUsNS45OSw1LjMzdjAuMzM5QzcxLjQyOCw5Ljg4OCw2OS4wNzksMTIuNSw2NS40MzgsMTIuNXogTTY5LjQ5Miw2Ljg2MWMwLTEuOTgtMS40NDQtMy43NDgtNC4wNTUtMy43NDgNCgkJcy00LjA0LDEuNzY4LTQuMDQsMy43NDh2MC4yNDZjMCwxLjk4MSwxLjQyOSwzLjc3OSw0LjA0LDMuNzc5czQuMDU1LTEuNzk4LDQuMDU1LTMuNzc5VjYuODYxeiIvPg0KCTxwYXRoIGZpbGw9IiM0NDQ0NDQiIGQ9Ik0yNC40OTgsMTIuMWwtMS4zNTItMi41MzVoLTYuMDA3TDE1LjgzNCwxMi4xaC0yLjAyOGw1LjUzMS0xMC4yM2gxLjU5N2w1LjYyMiwxMC4yM0gyNC40OThMMjQuNDk4LDEyLjF6DQoJCSBNMjAuMDksMy44NjZsLTIuMjI4LDQuMzAxaDQuNTMxTDIwLjA5LDMuODY2eiIvPg0KCTxwYXRoIGZpbGw9IiM0NDQ0NDQiIGQ9Ik0zNS4yODEsMTIuNWMtMy42NzEsMC01LjM3Ni0xLjk5Ni01LjM3Ni00LjY1NFYxLjg3aDEuOTA0djYuMDA2YzAsMS44OTEsMS4yNDUsMy4wMTMsMy42MSwzLjAxMw0KCQljMi40MjgsMCwzLjQyNi0xLjEyMiwzLjQyNi0zLjAxM1YxLjg3aDEuOTJ2NS45NzZDNDAuNzY3LDEwLjM4LDM5LjEzOCwxMi41LDM1LjI4MSwxMi41eiIvPg0KCTxwYXRoIGZpbGw9IiM0NDQ0NDQiIGQ9Ik01MS40NTgsMy40NjdWMTIuMWgtMS45MTlWMy40NjdoLTQuNDcxVjEuODdoMTAuODZ2MS41OThMNTEuNDU4LDMuNDY3TDUxLjQ1OCwzLjQ2N3oiLz4NCgk8cGF0aCBmaWxsPSIjNDQ0NDQ0IiBkPSJNODguNTQzLDEyLjFWNC4wMDRsLTAuNTA5LDAuODkxTDgzLjc0OSwxMi4xaC0wLjkzN2wtNC4yNC03LjIwNWwtMC41MDYtMC44OTFWMTIuMWgtMS44NzVWMS44N2gyLjY1OA0KCQlsNC4wNCw3LjAyMWwwLjQ3NiwwLjg2bDAuNDc3LTAuODZsMy45OTQtNy4wMjFoMi42MjdWMTIuMUg4OC41NDNMODguNTQzLDEyLjF6Ii8+DQoJPHBhdGggZmlsbD0iIzQ0NDQ0NCIgZD0iTTEwNC45NzgsMTIuMWwtMS4zNTItMi41MzVoLTYuMDA4TDk2LjMxMywxMi4xaC0yLjAyOGw1LjUzMS0xMC4yMzFoMS41OTlsNS42MjIsMTAuMjMxSDEwNC45Nzh6DQoJCSBNMTAwLjU3LDMuODY2bC0yLjIyOCw0LjMwMWg0LjUyOUwxMDAuNTcsMy44NjZ6Ii8+DQoJPHBhdGggZmlsbD0iIzQ0NDQ0NCIgZD0iTTExNC43NzgsMy40NjdWMTIuMWgtMS45MlYzLjQ2N2gtNC40N1YxLjg3aDEwLjg2djEuNTk4TDExNC43NzgsMy40NjdMMTE0Ljc3OCwzLjQ2N3oiLz4NCgk8cGF0aCBmaWxsPSIjNDQ0NDQ0IiBkPSJNMTI4Ljg2NiwzLjQ2N1YxMi4xaC0xLjkxOVYzLjQ2N2gtNC40NzJWMS44N2gxMC44NnYxLjU5OEwxMjguODY2LDMuNDY3TDEyOC44NjYsMy40Njd6Ii8+DQoJPHBhdGggZmlsbD0iIzQ0NDQ0NCIgZD0iTTEzOC4wNjcsMTIuMVYyLjgzN2MwLjc2OSwwLDEuMDc2LTAuNDE1LDEuMDc2LTAuOTY4aDAuODE0VjEyLjFIMTM4LjA2N0wxMzguMDY3LDEyLjF6Ii8+DQoJPHBhdGggZmlsbD0iIzQ0NDQ0NCIgZD0iTTE1NC45OTYsNC43NTdjLTAuOTIxLTAuODQ1LTIuMjc0LTEuNjQ0LTQuMTAyLTEuNjQ0Yy0yLjczMywwLTQuMjcsMS44NzUtNC4yNywzLjgyNXYwLjINCgkJYzAsMS45MzcsMS41NTEsMy43NDgsNC40MDgsMy43NDhjMS43MDUsMCwzLjExOC0wLjgxNCw0LjAwOS0xLjY0NGwxLjE1MiwxLjIxNWMtMS4xMjEsMS4xMDctMy4wMjYsMi4wNDMtNS4yODUsMi4wNDMNCgkJYy0zLjg3LDAtNi4yMjMtMi41MjEtNi4yMjMtNS4yODRWNi44NzdjMC0yLjc2NiwyLjU2Ni01LjM3Nyw2LjMxNC01LjM3N2MyLjE2NywwLDQuMTM2LDAuOTA2LDUuMTk0LDIuMDQzTDE1NC45OTYsNC43NTd6Ii8+DQoJPHBhdGggZmlsbD0iIzQ0NDQ0NCIgZD0iTTY2LjcwMiw1LjA2YzAuMzQ3LDAuMjI0LDAuNDQ0LDAuNjg3LDAuMjE5LDEuMDM3TDY1LjE2OSw4LjgxYy0wLjIyNSwwLjM0Ny0wLjY4OCwwLjQ0OC0xLjAzMywwLjIyOWwwLDANCgkJQzYzLjc5LDguODEyLDYzLjY5Miw4LjM1MSw2My45MTcsOGwxLjc1MS0yLjcxM0M2NS44OTMsNC45MzgsNjYuMzU1LDQuODM3LDY2LjcwMiw1LjA2TDY2LjcwMiw1LjA2eiIvPg0KPC9nPg0KPC9zdmc+DQo=');
}
#footer a:hover {
opacity: 1;
}
pre, code {
font: 14px/1.5 monospace;
}
.code {
display: block;
font: 14px/1.5 monospace;
width: 600px;
white-space: pre;
border: 1px solid #ccc;
padding: 10px;
overflow: auto;
min-height: 110px;
}
#iconlist .new, #iconlist .update {
position: relative;
}
#iconlist .new:after, #iconlist .update:after {
color: #e4c05c;
display: block;
content: "NEW";
font: bold 8px/1 sans-serif;
position: absolute;
top: 0px;
text-align: center;
z-index: 10;
width: 100%;
}
#iconlist .update:after {
content: "UPDATE";
left: -1px;
}
body.searching #iconlist span.update:after, body.searching #iconlist span.new:after {
display: none;
}
#search {
border: 0;
border-radius: 2px;
position: absolute;
right: 20px;
font: 11pt sans-serif;
padding: 10px;
top: 20px;
background: rgba(255,255,255,.8);
}
#search:focus {
background: #fff;
outline: none;
}
.genericon-404 {
display: none !important; /* This is an easter egg */
}
.genericon:after {
content: attr(alt);
display: block;
font-size: 9px;
color: #999;
text-align: center;
}
.hideUACs.genericon:after {
content: none;
}
@media only screen and ( max-width: 900px ) {
#glyph {
float: none;
width: 100%;
}
#glyph .info {
width: 30%;
}
#glyph .genericon {
width: 70%;
}
.description {
clear: both;
width: 100%;
background: none;
padding-left: 0;
float: none;
}
}
</style>
<script type="text/javascript">
/**
* Example page JS
*/
function copyToClipboard ( text, copyMode ) {
if ( copyMode == "css" ) {
window.prompt( "Copy this, then paste in your CSS :before selector.", text );
} else if ( copyMode == "html" ) {
window.prompt( "Copy this, then paste in your HTML.", text );
} else {
window.prompt( "Copy this, then paste in your Photoshop textfield.", text );
}
}
function pickRandomIcon() {
var divs = jQuery("#iconlist div").get().sort(function(){
return Math.round(Math.random())-0.5;
}).slice(0,1);
attr = jQuery(divs).attr('alt');
cssclass = jQuery(divs).attr('class');
displayGlyph( attr, cssclass );
}
function displayGlyph( attr, cssclass ) {
// set permalink
var permalink = cssclass.split(' genericon-')[1];
window.location.hash = permalink;
// css copy string
csstext = "content: \'\\" + attr + "';";
// html copy string
htmltext = '<span class="' + cssclass + '"></span>';
// glyph copy string
glyphtemp = "&#x" + attr + ";";
jQuery('#temp').html( glyphtemp );
glyphtext = jQuery('#temp').text();
// final output
output = '<div class="' + cssclass + '"></div>'
+ '<div class="info">'
+ '<strong>&larr; ' + cssclass.split( ' ' )[1] + '</strong>'
+ '<a href="javascript:copyToClipboard(csstext, \'css\')">Copy CSS</a>'
+ '<a href="javascript:copyToClipboard(htmltext, \'html\')">Copy HTML</a>'
+ '<a href="javascript:copyToClipboard(glyphtext)">Copy Glyph</a>'
+ '</div>';
jQuery( '#glyph' ).html( output );
}
function sortUnicode ( a, b ) {
var numberA = jQuery(a).attr('alt').replace('f', '');
var numberB = jQuery(b).attr('alt').replace('f', '');
var contentA =parseInt( numberA, 16 );
var contentB =parseInt( numberB, 16 );
return (contentA < contentB) ? -1 : (contentA > contentB) ? 1 : 0;
}
jQuery(document).ready(function() {
// pick random icon if no permalink, otherwise go to permalink
if ( window.location.hash ) {
permalink = "genericon-" + window.location.hash.split('#')[1];
attr = jQuery( '.' + permalink ).attr( 'alt' );
cssclass = jQuery( '.' + permalink ).attr('class');
displayGlyph( attr, cssclass );
} else {
pickRandomIcon();
}
jQuery( '#iconlist div' ).click(function() {
attr = jQuery( this ).attr( 'alt' );
cssclass = jQuery( this ).attr( 'class' );
displayGlyph( attr, cssclass );
});
var $rows = jQuery('#iconlist div');
jQuery('#search').keyup(function() {
// remove update text when using search
jQuery('body').addClass('searching');
var val = jQuery.trim(jQuery(this).val()).replace(/ +/g, ' ').toLowerCase();
$rows.show().filter(function() {
var text = jQuery(this).text().replace(/\s+/g, ' ').toLowerCase();
return !~text.indexOf(val);
}).hide();
});
jQuery('input#search').focus();
// sort based on number
jQuery('#iconlist div').sort( sortUnicode ).appendTo('#iconlist');
});
function toggleUACs() {
jQuery('.genericon').toggleClass('hideUACs');
}
</script>
</head>
<body>
<div id="main">
<div id="primary">
<div id="content">
<h2>Genericons <span>&mdash; A free, GPL, flexible icon font for blogs!</span></h2>
<input placeholder="Filter..." name="search" id="search" type="text" value="" maxlength="150" />
<div id="glyph">
</div>
<div class="description">
<p>Genericons are vector icons embedded in a webfont designed to be clean and simple keeping with a generic aesthetic. Use for instant HiDPI or to easily change colors on the fly.</p>
</div>
</div>
</div>
<div id="icons">
<div id="iconlist">
<!-- note, the text inside the HTML elements is purely for the seach -->
<div alt="f423" class="genericon genericon-404" title="genericon-404">404</div>
<div alt="f508" class="genericon genericon-activity" title="genericon-activity">activity</div>
<div alt="f509" class="genericon genericon-anchor" title="genericon-anchor">anchor</div>
<div alt="f101" class="genericon genericon-aside" title="genericon-aside">aside</div>
<div alt="f416" class="genericon genericon-attachment" title="genericon-attachment">attachment</div>
<div alt="f109" class="genericon genericon-audio" title="genericon-audio">audio</div>
<div alt="f471" class="genericon genericon-bold" title="genericon-bold">bold</div>
<div alt="f444" class="genericon genericon-book" title="genericon-book">book</div>
<div alt="f50a" class="genericon genericon-bug" title="genericon-bug">bug</div>
<div alt="f447" class="genericon genericon-cart" title="genericon-cart">cart</div>
<div alt="f301" class="genericon genericon-category" title="genericon-category">category</div>
<div alt="f108" class="genericon genericon-chat" title="genericon-chat">chat</div>
<div alt="f418" class="genericon genericon-checkmark" title="genericon-checkmark">checkmark</div>
<div alt="f405" class="genericon genericon-close" title="genericon-close">close</div>
<div alt="f406" class="genericon genericon-close-alt" title="genericon-close-alt">close-alt</div>
<div alt="f426" class="genericon genericon-cloud" title="genericon-cloud">cloud</div>
<div alt="f440" class="genericon genericon-cloud-download" title="genericon-cloud-download">cloud-download</div>
<div alt="f441" class="genericon genericon-cloud-upload" title="genericon-cloud-upload">cloud-upload</div>
<div alt="f462" class="genericon genericon-code" title="genericon-code">code</div>
<div alt="f216" class="genericon genericon-codepen" title="genericon-codepen">codepen</div>
<div alt="f445" class="genericon genericon-cog" title="genericon-cog">cog</div>
<div alt="f432" class="genericon genericon-collapse" title="genericon-collapse">collapse</div>
<div alt="f300" class="genericon genericon-comment" title="genericon-comment">comment</div>
<div alt="f305" class="genericon genericon-day" title="genericon-day">day</div>
<div alt="f221" class="genericon genericon-digg" title="genericon-digg">digg</div>
<div alt="f443" class="genericon genericon-document" title="genericon-document">document</div>
<div alt="f428" class="genericon genericon-dot" title="genericon-dot">dot</div>
<div alt="f502" class="genericon genericon-downarrow" title="genericon-downarrow">downarrow</div>
<div alt="f50b" class="genericon genericon-download" title="genericon-download">download</div>
<div alt="f436" class="genericon genericon-draggable" title="genericon-draggable">draggable</div>
<div alt="f201" class="genericon genericon-dribbble" title="genericon-dribbble">dribbble</div>
<div alt="f225" class="genericon genericon-dropbox" title="genericon-dropbox">dropbox</div>
<div alt="f433" class="genericon genericon-dropdown" title="genericon-dropdown">dropdown</div>
<div alt="f434" class="genericon genericon-dropdown-left" title="genericon-dropdown-left">dropdown-left</div>
<div alt="f411" class="genericon genericon-edit" title="genericon-edit">edit</div>
<div alt="f476" class="genericon genericon-ellipsis" title="genericon-ellipsis">ellipsis</div>
<div alt="f431" class="genericon genericon-expand" title="genericon-expand">expand</div>
<div alt="f442" class="genericon genericon-external" title="genericon-external">external</div>
<div alt="f203" class="genericon genericon-facebook" title="genericon-facebook">facebook</div>
<div alt="f204" class="genericon genericon-facebook-alt" title="genericon-facebook-alt">facebook-alt</div>
<div alt="f458" class="genericon genericon-fastforward" title="genericon-fastforward">fastforward</div>
<div alt="f413" class="genericon genericon-feed" title="genericon-feed">feed</div>
<div alt="f468" class="genericon genericon-flag" title="genericon-flag">flag</div>
<div alt="f211" class="genericon genericon-flickr" title="genericon-flickr">flickr</div>
<div alt="f226" class="genericon genericon-foursquare" title="genericon-foursquare">foursquare</div>
<div alt="f474" class="genericon genericon-fullscreen" title="genericon-fullscreen">fullscreen</div>
<div alt="f103" class="genericon genericon-gallery" title="genericon-gallery">gallery</div>
<div alt="f200" class="genericon genericon-github" title="genericon-github">github</div>
<div alt="f206" class="genericon genericon-googleplus" title="genericon-googleplus">googleplus</div>
<div alt="f218" class="genericon genericon-googleplus-alt" title="genericon-googleplus-alt">googleplus-alt</div>
<div alt="f50c" class="genericon genericon-handset" title="genericon-handset">handset</div>
<div alt="f461" class="genericon genericon-heart" title="genericon-heart">heart</div>
<div alt="f457" class="genericon genericon-help" title="genericon-help">help</div>
<div alt="f404" class="genericon genericon-hide" title="genericon-hide">hide</div>
<div alt="f505" class="genericon genericon-hierarchy" title="genericon-hierarchy">hierarchy</div>
<div alt="f409" class="genericon genericon-home" title="genericon-home">home</div>
<div alt="f102" class="genericon genericon-image" title="genericon-image">image</div>
<div alt="f455" class="genericon genericon-info" title="genericon-info">info</div>
<div alt="f215" class="genericon genericon-instagram" title="genericon-instagram">instagram</div>
<div alt="f472" class="genericon genericon-italic" title="genericon-italic">italic</div>
<div alt="f427" class="genericon genericon-key" title="genericon-key">key</div>
<div alt="f503" class="genericon genericon-leftarrow" title="genericon-leftarrow">leftarrow</div>
<div alt="f107" class="genericon genericon-link" title="genericon-link">link</div>
<div alt="f207" class="genericon genericon-linkedin" title="genericon-linkedin">linkedin</div>
<div alt="f208" class="genericon genericon-linkedin-alt" title="genericon-linkedin-alt">linkedin-alt</div>
<div alt="f417" class="genericon genericon-location" title="genericon-location">location</div>
<div alt="f470" class="genericon genericon-lock" title="genericon-lock">lock</div>
<div alt="f410" class="genericon genericon-mail" title="genericon-mail">mail</div>
<div alt="f422" class="genericon genericon-maximize" title="genericon-maximize">maximize</div>
<div alt="f419" class="genericon genericon-menu" title="genericon-menu">menu</div>
<div alt="f50d" class="genericon genericon-microphone" title="genericon-microphone">microphone</div>
<div alt="f421" class="genericon genericon-minimize" title="genericon-minimize">minimize</div>
<div alt="f50e" class="genericon genericon-minus" title="genericon-minus">minus</div>
<div alt="f307" class="genericon genericon-month" title="genericon-month">month</div>
<div alt="f50f" class="genericon genericon-move" title="genericon-move">move</div>
<div alt="f429" class="genericon genericon-next" title="genericon-next">next</div>
<div alt="f456" class="genericon genericon-notice" title="genericon-notice">notice</div>
<div alt="f506" class="genericon genericon-paintbrush" title="genericon-paintbrush">paintbrush</div>
<div alt="f219" class="genericon genericon-path" title="genericon-path">path</div>
<div alt="f448" class="genericon genericon-pause" title="genericon-pause">pause</div>
<div alt="f437" class="genericon genericon-phone" title="genericon-phone">phone</div>
<div alt="f473" class="genericon genericon-picture" title="genericon-picture">picture</div>
<div alt="f308" class="genericon genericon-pinned" title="genericon-pinned">pinned</div>
<div alt="f209" class="genericon genericon-pinterest" title="genericon-pinterest">pinterest</div>
<div alt="f210" class="genericon genericon-pinterest-alt" title="genericon-pinterest-alt">pinterest-alt</div>
<div alt="f452" class="genericon genericon-play" title="genericon-play">play</div>
<div alt="f439" class="genericon genericon-plugin" title="genericon-plugin">plugin</div>
<div alt="f510" class="genericon genericon-plus" title="genericon-plus">plus</div>
<div alt="f224" class="genericon genericon-pocket" title="genericon-pocket">pocket</div>
<div alt="f217" class="genericon genericon-polldaddy" title="genericon-polldaddy">polldaddy</div>
<div alt="f460" class="genericon genericon-portfolio" title="genericon-portfolio">portfolio</div>
<div alt="f430" class="genericon genericon-previous" title="genericon-previous">previous</div>
<div alt="f469" class="genericon genericon-print" title="genericon-print">print</div>
<div alt="f106" class="genericon genericon-quote" title="genericon-quote">quote</div>
<div alt="f511" class="genericon genericon-rating-empty" title="genericon-rating-empty">rating-empty</div>
<div alt="f512" class="genericon genericon-rating-full" title="genericon-rating-full">rating-full</div>
<div alt="f513" class="genericon genericon-rating-half" title="genericon-rating-half">rating-half</div>
<div alt="f222" class="genericon genericon-reddit" title="genericon-reddit">reddit</div>
<div alt="f420" class="genericon genericon-refresh" title="genericon-refresh">refresh</div>
<div alt="f412" class="genericon genericon-reply" title="genericon-reply">reply</div>
<div alt="f466" class="genericon genericon-reply-alt" title="genericon-reply-alt">reply-alt</div>
<div alt="f467" class="genericon genericon-reply-single" title="genericon-reply-single">reply-single</div>
<div alt="f459" class="genericon genericon-rewind" title="genericon-rewind">rewind</div>
<div alt="f501" class="genericon genericon-rightarrow" title="genericon-rightarrow">rightarrow</div>
<div alt="f400" class="genericon genericon-search" title="genericon-search">search</div>
<div alt="f438" class="genericon genericon-send-to-phone" title="genericon-send-to-phone">send-to-phone</div>
<div alt="f454" class="genericon genericon-send-to-tablet" title="genericon-send-to-tablet">send-to-tablet</div>
<div alt="f415" class="genericon genericon-share" title="genericon-share">share</div>
<div alt="f403" class="genericon genericon-show" title="genericon-show">show</div>
<div alt="f514" class="genericon genericon-shuffle" title="genericon-shuffle">shuffle</div>
<div alt="f507" class="genericon genericon-sitemap" title="genericon-sitemap">sitemap</div>
<div alt="f451" class="genericon genericon-skip-ahead" title="genericon-skip-ahead">skip-ahead</div>
<div alt="f450" class="genericon genericon-skip-back" title="genericon-skip-back">skip-back</div>
<div alt="f220" class="genericon genericon-skype" title="genericon-skype">skype</div>
<div alt="f424" class="genericon genericon-spam" title="genericon-spam">spam</div>
<div alt="f515" class="genericon genericon-spotify" title="genericon-spotify">spotify</div>
<div alt="f100" class="genericon genericon-standard" title="genericon-standard">standard</div>
<div alt="f408" class="genericon genericon-star" title="genericon-star">star</div>
<div alt="f105" class="genericon genericon-status" title="genericon-status">status</div>
<div alt="f449" class="genericon genericon-stop" title="genericon-stop">stop</div>
<div alt="f223" class="genericon genericon-stumbleupon" title="genericon-stumbleupon">stumbleupon</div>
<div alt="f463" class="genericon genericon-subscribe" title="genericon-subscribe">subscribe</div>
<div alt="f465" class="genericon genericon-subscribed" title="genericon-subscribed">subscribed</div>
<div alt="f425" class="genericon genericon-summary" title="genericon-summary">summary</div>
<div alt="f453" class="genericon genericon-tablet" title="genericon-tablet">tablet</div>
<div alt="f302" class="genericon genericon-tag" title="genericon-tag">tag</div>
<div alt="f303" class="genericon genericon-time" title="genericon-time">time</div>
<div alt="f435" class="genericon genericon-top" title="genericon-top">top</div>
<div alt="f407" class="genericon genericon-trash" title="genericon-trash">trash</div>
<div alt="f214" class="genericon genericon-tumblr" title="genericon-tumblr">tumblr</div>
<div alt="f516" class="genericon genericon-twitch" title="genericon-twitch">twitch</div>
<div alt="f202" class="genericon genericon-twitter" title="genericon-twitter">twitter</div>
<div alt="f446" class="genericon genericon-unapprove" title="genericon-unapprove">unapprove</div>
<div alt="f464" class="genericon genericon-unsubscribe" title="genericon-unsubscribe">unsubscribe</div>
<div alt="f401" class="genericon genericon-unzoom" title="genericon-unzoom">unzoom</div>
<div alt="f500" class="genericon genericon-uparrow" title="genericon-uparrow">uparrow</div>
<div alt="f304" class="genericon genericon-user" title="genericon-user">user</div>
<div alt="f104" class="genericon genericon-video" title="genericon-video">video</div>
<div alt="f517" class="genericon genericon-videocamera" title="genericon-videocamera">videocamera</div>
<div alt="f212" class="genericon genericon-vimeo" title="genericon-vimeo">vimeo</div>
<div alt="f414" class="genericon genericon-warning" title="genericon-warning">warning</div>
<div alt="f475" class="genericon genericon-website" title="genericon-website">website</div>
<div alt="f306" class="genericon genericon-week" title="genericon-week">week</div>
<div alt="f205" class="genericon genericon-wordpress" title="genericon-wordpress">wordpress</div>
<div alt="f504" class="genericon genericon-xpost" title="genericon-xpost">xpost</div>
<div alt="f213" class="genericon genericon-youtube" title="genericon-youtube">youtube</div>
<div alt="f402" class="genericon genericon-zoom" title="genericon-zoom">zoom</div>
</div>
<div id="temp" style="display: none;"></div>
</div>
<div id="footer">
<p>An <a href="http://automattic.com" rel="nofollow">Automattic</a> Portrayal</p>
<p>No designers were harmed in the making of this icon font.</p>
</div>
</div>
</body>
</html>

View File

@@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentyfifteen/
Author: the WordPress team
Author URI: https://wordpress.org/
Description: Our 2015 default theme is clean, blog-focused, and designed for clarity. Twenty Fifteen's simple, straightforward typography is readable on a wide variety of screen sizes, and suitable for multiple languages. We designed it using a mobile-first approach, meaning your content takes center-stage, regardless of whether your visitors arrive by smartphone, tablet, laptop, or desktop computer.
Version: 1.1
Version: 1.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: black, blue, gray, pink, purple, white, yellow, dark, light, two-columns, left-sidebar, fixed-layout, responsive-layout, accessibility-ready, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready

View File

@@ -1,464 +0,0 @@
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<title>Genericons</title>
<link rel="stylesheet" href="genericons.css">
<style type="text/css">
body {
font-family: sans-serif;
line-height: 1.5;
width: 800px;
margin: 50px auto;
color: #777;
background: white;
}
.icons {
overflow: hidden;
padding: 10px 0;
}
.icons div {
cursor: pointer;
float: left;
margin: 0 30px 30px 0;
}
.icons:hover div {
background: #f7f7f7;
}
.code {
display: block;
font: 14px/1.5 monospace;
width: 740px;
white-space: pre;
border: 1px solid #ccc;
padding: 10px;
color: #777;
overflow: auto;
}
.my-icon:before {
content: '\f408';
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 32px/1 'Genericons';
vertical-align: middle;
}
/* For the Examples */
.my-checklist {
list-style-type: none;
text-indent: -16px;
}
.my-checklist li:before {
padding-right: 16px;
content: '\f418';
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 16px/1 'Genericons';
vertical-align: text-top;
}
.my-blockquote {
background: #eee;
border-left: 32px solid #ddd;
padding: 10px;
}
.my-blockquote:before {
margin-left: -42px;
padding-right: 10px;
content: '\f106';
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 32px/20px 'Genericons';
vertical-align: bottom;
}
.my-button {
font-family: Helvetica, sans-serif;
font-size: 14px;
background: #e05d22; /* Old browsers */
background: -webkit-linear-gradient(top, #e05d22 0%, #d94412 100%); /* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient( top, #e05d22 0%, #d94412 100%); /* FF3.6+ */
background: -ms-linear-gradient( top, #e05d22 0%, #d94412 100%); /* IE10+ */
background: -o-linear-gradient( top, #e05d22 0%, #d94412 100%); /* Opera 11.10+ */
background: linear-gradient( to bottom, #e05d22 0%, #d94412 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e05d22', endColorstr='#d94412', GradientType=0); /* IE6-9 */
display: inline-block;
padding: 10px 16px 4px 16px;
color: #fff;
text-decoration: none;
border: none;
border-bottom: 3px solid #b93207;
border-radius: 2px;
}
.my-button:hover,
.my-button:focus {
background: #ed6a31; /* Old browsers */
background: -webkit-linear-gradient(top, #ed6a31 0%, #e55627 100%); /* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient( top, #ed6a31 0%, #e55627 100%); /* FF3.6+ */
background: -ms-linear-gradient( top, #ed6a31 0%, #e55627 100%); /* IE10+ */
background: -o-linear-gradient( top, #ed6a31 0%, #e55627 100%); /* Opera 11.10+ */
background: linear-gradient( to bottom, #ed6a31 0%, #e55627 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ed6a31', endColorstr='#e55627', GradientType=0); /* IE6-9 */
outline: none;
}
.my-button:active {
background: #d94412; /* Old browsers */
background: -webkit-linear-gradient(top, #d94412 0%, #e05d22 100%); /* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient( top, #d94412 0%, #e05d22 100%); /* FF3.6+ */
background: -ms-linear-gradient( top, #d94412 0%, #e05d22 100%); /* IE10+ */
background: -o-linear-gradient( top, #d94412 0%, #e05d22 100%); /* Opera 11.10+ */
background: linear-gradient( to bottom, #d94412 0%, #e05d22 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#d94412', endColorstr='#e05d22', GradientType=0); /* IE6-9 */
border: none;
border-top: 3px solid #b93207;
padding: 6px 16px 7px 16px;
}
</style>
</head>
<body>
<div class="section">
<h1>Genericons Usage</h1>
<p>Copy the <strong>font</strong> folder and the <strong>genericons.css</strong> file together into your project. Link the CSS in your HTML:</p>
<p><code>&lt;link href="path/to/genericons.css" rel="stylesheet"&gt;</code></p>
<p>Drop in the following HTML with the name of the icon you want to display:</p>
<p><code>&lt;div class="genericon genericon-standard"&gt;&lt;/div&gt;</code></p>
<div class="icons">
<!-- post formats -->
<div alt="f100" class="genericon genericon-standard"></div>
<div alt="f101" class="genericon genericon-aside"></div>
<div alt="f102" class="genericon genericon-image"></div>
<div alt="f103" class="genericon genericon-gallery"></div>
<div alt="f104" class="genericon genericon-video"></div>
<div alt="f105" class="genericon genericon-status"></div>
<div alt="f106" class="genericon genericon-quote"></div>
<div alt="f107" class="genericon genericon-link"></div>
<div alt="f108" class="genericon genericon-chat"></div>
<div alt="f109" class="genericon genericon-audio"></div>
<!-- social icons -->
<div alt="f200" class="genericon genericon-github"></div>
<div alt="f201" class="genericon genericon-dribbble"></div>
<div alt="f202" class="genericon genericon-twitter"></div>
<div alt="f203" class="genericon genericon-facebook"></div>
<div alt="f204" class="genericon genericon-facebook-alt"></div>
<div alt="f205" class="genericon genericon-wordpress"></div>
<div alt="f206" class="genericon genericon-googleplus"></div>
<div alt="f207" class="genericon genericon-linkedin"></div>
<div alt="f208" class="genericon genericon-linkedin-alt"></div>
<div alt="f209" class="genericon genericon-pinterest"></div>
<div alt="f210" class="genericon genericon-pinterest-alt"></div>
<div alt="f211" class="genericon genericon-flickr"></div>
<div alt="f212" class="genericon genericon-vimeo"></div>
<div alt="f213" class="genericon genericon-youtube"></div>
<div alt="f214" class="genericon genericon-tumblr"></div>
<div alt="f215" class="genericon genericon-instagram"></div>
<div alt="f216" class="genericon genericon-codepen"></div>
<div alt="f217" class="genericon genericon-polldaddy"></div>
<div alt="f218" class="genericon genericon-googleplus-alt"></div>
<div alt="f219" class="genericon genericon-path"></div>
<div alt="f220" class="genericon genericon-skype"></div>
<div alt="f221" class="genericon genericon-digg"></div>
<div alt="f222" class="genericon genericon-reddit"></div>
<div alt="f223" class="genericon genericon-stumbleupon"></div>
<div alt="f224" class="genericon genericon-pocket"></div>
<div alt="f225" class="genericon genericon-dropbox"></div>
<!-- meta icons -->
<div alt="f300" class="genericon genericon-comment"></div>
<div alt="f301" class="genericon genericon-category"></div>
<div alt="f302" class="genericon genericon-tag"></div>
<div alt="f303" class="genericon genericon-time"></div>
<div alt="f304" class="genericon genericon-user"></div>
<div alt="f305" class="genericon genericon-day"></div>
<div alt="f306" class="genericon genericon-week"></div>
<div alt="f307" class="genericon genericon-month"></div>
<div alt="f308" class="genericon genericon-pinned"></div>
<!-- other icons -->
<div alt="f400" class="genericon genericon-search"></div>
<div alt="f401" class="genericon genericon-unzoom"></div>
<div alt="f402" class="genericon genericon-zoom"></div>
<div alt="f403" class="genericon genericon-show"></div>
<div alt="f404" class="genericon genericon-hide"></div>
<div alt="f405" class="genericon genericon-close"></div>
<div alt="f406" class="genericon genericon-close-alt"></div>
<div alt="f407" class="genericon genericon-trash"></div>
<div alt="f408" class="genericon genericon-star"></div>
<div alt="f409" class="genericon genericon-home"></div>
<div alt="f410" class="genericon genericon-mail"></div>
<div alt="f411" class="genericon genericon-edit"></div>
<div alt="f412" class="genericon genericon-reply"></div>
<div alt="f413" class="genericon genericon-feed"></div>
<div alt="f414" class="genericon genericon-warning"></div>
<div alt="f415" class="genericon genericon-share"></div>
<div alt="f416" class="genericon genericon-attachment"></div>
<div alt="f417" class="genericon genericon-location"></div>
<div alt="f418" class="genericon genericon-checkmark"></div>
<div alt="f419" class="genericon genericon-menu"></div>
<div alt="f420" class="genericon genericon-refresh"></div>
<div alt="f421" class="genericon genericon-minimize"></div>
<div alt="f422" class="genericon genericon-maximize"></div>
<div alt="f423" class="genericon genericon-404"></div>
<div alt="f424" class="genericon genericon-spam"></div>
<div alt="f425" class="genericon genericon-summary"></div>
<div alt="f426" class="genericon genericon-cloud"></div>
<div alt="f427" class="genericon genericon-key"></div>
<div alt="f428" class="genericon genericon-dot"></div>
<div alt="f429" class="genericon genericon-next"></div>
<div alt="f430" class="genericon genericon-previous"></div>
<div alt="f431" class="genericon genericon-expand"></div>
<div alt="f432" class="genericon genericon-collapse"></div>
<div alt="f433" class="genericon genericon-dropdown"></div>
<div alt="f434" class="genericon genericon-dropdown-left"></div>
<div alt="f435" class="genericon genericon-top"></div>
<div alt="f436" class="genericon genericon-draggable"></div>
<div alt="f437" class="genericon genericon-phone"></div>
<div alt="f438" class="genericon genericon-send-to-phone"></div>
<div alt="f439" class="genericon genericon-plugin"></div>
<div alt="f440" class="genericon genericon-cloud-download"></div>
<div alt="f441" class="genericon genericon-cloud-upload"></div>
<div alt="f442" class="genericon genericon-external"></div>
<div alt="f443" class="genericon genericon-document"></div>
<div alt="f444" class="genericon genericon-book"></div>
<div alt="f445" class="genericon genericon-cog"></div>
<div alt="f446" class="genericon genericon-unapprove"></div>
<div alt="f447" class="genericon genericon-cart"></div>
<div alt="f448" class="genericon genericon-pause"></div>
<div alt="f449" class="genericon genericon-stop"></div>
<div alt="f450" class="genericon genericon-skip-back"></div>
<div alt="f451" class="genericon genericon-skip-ahead"></div>
<div alt="f452" class="genericon genericon-play"></div>
<div alt="f453" class="genericon genericon-tablet"></div>
<div alt="f454" class="genericon genericon-send-to-tablet"></div>
<div alt="f455" class="genericon genericon-info"></div>
<div alt="f456" class="genericon genericon-notice"></div>
<div alt="f457" class="genericon genericon-help"></div>
<div alt="f458" class="genericon genericon-fastforward"></div>
<div alt="f459" class="genericon genericon-rewind"></div>
<div alt="f460" class="genericon genericon-portfolio"></div>
<div alt="f461" class="genericon genericon-heart"></div>
<div alt="f462" class="genericon genericon-code"></div>
<div alt="f463" class="genericon genericon-subscribe"></div>
<div alt="f464" class="genericon genericon-unsubscribe"></div>
<div alt="f465" class="genericon genericon-subscribed"></div>
<div alt="f466" class="genericon genericon-reply-alt"></div>
<div alt="f467" class="genericon genericon-reply-single"></div>
<div alt="f468" class="genericon genericon-flag"></div>
<div alt="f469" class="genericon genericon-print"></div>
<div alt="f470" class="genericon genericon-lock"></div>
<div alt="f471" class="genericon genericon-bold"></div>
<div alt="f472" class="genericon genericon-italic"></div>
<div alt="f473" class="genericon genericon-picture"></div>
<div alt="f474" class="genericon genericon-fullscreen"></div>
<!-- generic shapes -->
<div alt="f500" class="genericon genericon-uparrow"></div>
<div alt="f501" class="genericon genericon-rightarrow"></div>
<div alt="f502" class="genericon genericon-downarrow"></div>
<div alt="f503" class="genericon genericon-leftarrow"></div>
</div>
<p>If you want to insert an icon manually using the <code>:before</code> selector, you can setup CSS rules like the following example. <strong>Make sure to set the size to a multiple of 16px</strong> or the icons could end up looking fuzzy:</p>
<p><textarea class="code" style="min-height: 150px;" onclick="select();">.my-icon:before {
content: '\f408';
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 32px/1 'Genericons';
vertical-align: middle;
}</textarea></p>
<p>Add a matching class to your HTML:</p>
<p><code>&lt;div class="my-icon"&gt;You're a Star!&lt;/div&gt;</code></p>
<p>Here's the result: <span class="my-icon">You're a Star!</span></p>
<h2>Examples</h2>
<p>Turn every icon a <span style="color: #fa8072;">Salmon</span> color:</p>
<p><textarea class="code" style="min-height: 70px" onclick="select();">
.genericon {
color: #fa8072;
}</textarea></p>
<p>Or turn the stars <span style="color: #ffd700;">Gold</span>:</p>
<p><textarea class="code" style="min-height: 70px" onclick="select();">
.genericon-star {
color: #fa8072;
}</textarea></p>
<p>Use icons for bulleted lists:</p>
<ul class="my-checklist">
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
</ul>
<p><textarea class="code" style="min-height: 130px" onclick="select();">
<ul class="my-checklist">
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
</ul></textarea></p>
<p><textarea class="code" style="min-height: 260px;" onclick="select();">
.my-checklist {
list-style-type: none;
text-indent: -16px;
}
.my-checklist li:before {
padding-right: 16px;
content: '\f418';
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 16px/1 'Genericons';
vertical-align: text-top;
}</textarea></p>
<p>Use icons to style blockquotes:</p>
<blockquote class="my-blockquote">Sometimes I've believed as many as six impossible things before breakfast. &mdash;<em>Lewis Carroll</em></blockquote>
<blockquote class="my-blockquote">`Twas brillig, and the slithy toves Did gyre and gimble in the wabe: All mimsy were the borogoves, And the mome raths outgrabe. "Beware the Jabberwock, my son! The jaws that bite, the claws that catch! Beware the Jubjub bird, and shun The frumious Bandersnatch!"</blockquote>
<p><textarea class="code" style="min-height: 40px;" onclick="select();"><blockquote class="my-blockquote">Sometimes I've believed as many as six impossible things before breakfast. &mdash;<em>Lewis Carroll</em></blockquote></textarea></p>
<p><textarea class="code" style="min-height: 300px;" onclick="select();">
.my-blockquote {
background: #eee;
border-left: 32px solid #ddd;
padding: 10px;
}
.my-blockquote:before {
margin-left: -42px;
padding-right: 10px;
content: '\f106';
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 32px/20px 'Genericons';
vertical-align: bottom;
} </textarea></p>
<p>Use icons to style buttons:</p>
<a class="my-button" href="javascript:void()"><i class="genericon genericon-show"></i> View</a>
<a class="my-button" href="javascript:void()"><i class="genericon genericon-audio"></i> Listen</a>
<p><textarea class="code" style="min-height: 40px;" onclick="select();"><a class="my-button" href="#"><i class="genericon genericon-show"></i> View</a>
<a class="my-button" href="#"><i class="genericon genericon-audio"></i> Listen</a></textarea></p>
<p><textarea class="code" style="min-height: 300px;" onclick="select();">
.my-button {
font-family: Helvetica, sans-serif;
background: #e05d22; /* Old browsers */
background: -webkit-linear-gradient(top, #e05d22 0%, #d94412 100%); /* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient( top, #e05d22 0%, #d94412 100%); /* FF3.6+ */
background: -ms-linear-gradient( top, #e05d22 0%, #d94412 100%); /* IE10+ */
background: -o-linear-gradient( top, #e05d22 0%, #d94412 100%); /* Opera 11.10+ */
background: linear-gradient( to bottom, #e05d22 0%, #d94412 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e05d22', endColorstr='#d94412', GradientType=0); /* IE6-9 */
display: inline-block;
padding: 10px 16px 6px 16px;
color: #fff;
text-decoration: none;
border: none;
border-bottom: 3px solid #b93207;
border-radius: 2px;
}
.my-button:hover,
.my-button:focus {
background: #ed6a31; /* Old browsers */
background: -webkit-linear-gradient(top, #ed6a31 0%, #e55627 100%); /* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient( top, #ed6a31 0%, #e55627 100%); /* FF3.6+ */
background: -ms-linear-gradient( top, #ed6a31 0%, #e55627 100%); /* IE10+ */
background: -o-linear-gradient( top, #ed6a31 0%, #e55627 100%); /* Opera 11.10+ */
background: linear-gradient( to bottom, #ed6a31 0%, #e55627 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ed6a31', endColorstr='#e55627', GradientType=0); /* IE6-9 */
outline: none;
}
.my-button:active {
background: #d94412; /* Old browsers */
background: -webkit-linear-gradient(top, #d94412 0%, #e05d22 100%); /* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient( top, #d94412 0%, #e05d22 100%); /* FF3.6+ */
background: -ms-linear-gradient( top, #d94412 0%, #e05d22 100%); /* IE10+ */
background: -o-linear-gradient( top, #d94412 0%, #e05d22 100%); /* Opera 11.10+ */
background: linear-gradient( to bottom, #d94412 0%, #e05d22 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#d94412', endColorstr='#e05d22', GradientType=0); /* IE6-9 */
border: none;
border-top: 3px solid #b93207;
padding: 6px 16px 10px 16px;
}</textarea>/</p>
<h2>CSS Preprocessors</h2>
<p>Preprocessing extensions such as Sass (SCSS Syntax) or LESS</a> can make it easier to manage CSS for a lot of things at once using things like variables and mixins.</p>
<p>This example will seup the basic genericon rules and sets a color you can use for all icons using Sass:</p>
<p><textarea class="code" style="min-height: 360px;" onclick="select();">$icon-color: "#fa8072";
.genericon {
color: $icon-color;
}
@mixin genericon-rules {
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 16px/1 'Genericons';
vertical-align: middle;
}
.my-icon:before {
content: '\f408';
@include genericon-rules;
}</textarea></p>
<p>Here is a similar example for LESS:</p>
<p><textarea class="code" style="min-height: 360px;" onclick="select();">@icon-color: "#fa8072";
.genericon {
color: @icon-color;
}
.genericon-rules {
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 16px/1 'Genericons';
vertical-align: middle;
}
.my-icon:before {
content: '\f408';
.genericon-rules;
}</textarea></p>
<h2>Fallback images for IE7 and below</h2>
<p>Genericons <strong>does not come with fallback icons by default</strong> -- therefore you have to create them yourself. If you are using HTML similar to this example:
<p><code>&lt;span class="genericon genericon-warning"&gt;&lt;/span&gt;</code></p>
<p>You can use the asterisk hack to serve a different icon to IE7 once you have saved the fallback icons to your project:</p>
<textarea class="code" style="min-height: 85px;" onclick="select();">.genericon-warning {
*background: url(fallback-icon.png) no-repeat center center;
*text-indent: 100%;
}</textarea>
</div>
</body>
</html>

View File

@@ -1,464 +0,0 @@
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<title>Genericons</title>
<link rel="stylesheet" href="genericons.css">
<style type="text/css">
body {
font-family: sans-serif;
line-height: 1.5;
width: 800px;
margin: 50px auto;
color: #777;
background: white;
}
.icons {
overflow: hidden;
padding: 10px 0;
}
.icons div {
cursor: pointer;
float: left;
margin: 0 30px 30px 0;
}
.icons:hover div {
background: #f7f7f7;
}
.code {
display: block;
font: 14px/1.5 monospace;
width: 740px;
white-space: pre;
border: 1px solid #ccc;
padding: 10px;
color: #777;
overflow: auto;
}
.my-icon:before {
content: '\f408';
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 32px/1 'Genericons';
vertical-align: middle;
}
/* For the Examples */
.my-checklist {
list-style-type: none;
text-indent: -16px;
}
.my-checklist li:before {
padding-right: 16px;
content: '\f418';
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 16px/1 'Genericons';
vertical-align: text-top;
}
.my-blockquote {
background: #eee;
border-left: 32px solid #ddd;
padding: 10px;
}
.my-blockquote:before {
margin-left: -42px;
padding-right: 10px;
content: '\f106';
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 32px/20px 'Genericons';
vertical-align: bottom;
}
.my-button {
font-family: Helvetica, sans-serif;
font-size: 14px;
background: #e05d22; /* Old browsers */
background: -webkit-linear-gradient(top, #e05d22 0%, #d94412 100%); /* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient( top, #e05d22 0%, #d94412 100%); /* FF3.6+ */
background: -ms-linear-gradient( top, #e05d22 0%, #d94412 100%); /* IE10+ */
background: -o-linear-gradient( top, #e05d22 0%, #d94412 100%); /* Opera 11.10+ */
background: linear-gradient( to bottom, #e05d22 0%, #d94412 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e05d22', endColorstr='#d94412', GradientType=0); /* IE6-9 */
display: inline-block;
padding: 10px 16px 4px 16px;
color: #fff;
text-decoration: none;
border: none;
border-bottom: 3px solid #b93207;
border-radius: 2px;
}
.my-button:hover,
.my-button:focus {
background: #ed6a31; /* Old browsers */
background: -webkit-linear-gradient(top, #ed6a31 0%, #e55627 100%); /* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient( top, #ed6a31 0%, #e55627 100%); /* FF3.6+ */
background: -ms-linear-gradient( top, #ed6a31 0%, #e55627 100%); /* IE10+ */
background: -o-linear-gradient( top, #ed6a31 0%, #e55627 100%); /* Opera 11.10+ */
background: linear-gradient( to bottom, #ed6a31 0%, #e55627 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ed6a31', endColorstr='#e55627', GradientType=0); /* IE6-9 */
outline: none;
}
.my-button:active {
background: #d94412; /* Old browsers */
background: -webkit-linear-gradient(top, #d94412 0%, #e05d22 100%); /* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient( top, #d94412 0%, #e05d22 100%); /* FF3.6+ */
background: -ms-linear-gradient( top, #d94412 0%, #e05d22 100%); /* IE10+ */
background: -o-linear-gradient( top, #d94412 0%, #e05d22 100%); /* Opera 11.10+ */
background: linear-gradient( to bottom, #d94412 0%, #e05d22 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#d94412', endColorstr='#e05d22', GradientType=0); /* IE6-9 */
border: none;
border-top: 3px solid #b93207;
padding: 6px 16px 7px 16px;
}
</style>
</head>
<body>
<div class="section">
<h1>Genericons Usage</h1>
<p>Copy the <strong>font</strong> folder and the <strong>genericons.css</strong> file together into your project. Link the CSS in your HTML:</p>
<p><code>&lt;link href="path/to/genericons.css" rel="stylesheet"&gt;</code></p>
<p>Drop in the following HTML with the name of the icon you want to display:</p>
<p><code>&lt;div class="genericon genericon-standard"&gt;&lt;/div&gt;</code></p>
<div class="icons">
<!-- post formats -->
<div alt="f100" class="genericon genericon-standard"></div>
<div alt="f101" class="genericon genericon-aside"></div>
<div alt="f102" class="genericon genericon-image"></div>
<div alt="f103" class="genericon genericon-gallery"></div>
<div alt="f104" class="genericon genericon-video"></div>
<div alt="f105" class="genericon genericon-status"></div>
<div alt="f106" class="genericon genericon-quote"></div>
<div alt="f107" class="genericon genericon-link"></div>
<div alt="f108" class="genericon genericon-chat"></div>
<div alt="f109" class="genericon genericon-audio"></div>
<!-- social icons -->
<div alt="f200" class="genericon genericon-github"></div>
<div alt="f201" class="genericon genericon-dribbble"></div>
<div alt="f202" class="genericon genericon-twitter"></div>
<div alt="f203" class="genericon genericon-facebook"></div>
<div alt="f204" class="genericon genericon-facebook-alt"></div>
<div alt="f205" class="genericon genericon-wordpress"></div>
<div alt="f206" class="genericon genericon-googleplus"></div>
<div alt="f207" class="genericon genericon-linkedin"></div>
<div alt="f208" class="genericon genericon-linkedin-alt"></div>
<div alt="f209" class="genericon genericon-pinterest"></div>
<div alt="f210" class="genericon genericon-pinterest-alt"></div>
<div alt="f211" class="genericon genericon-flickr"></div>
<div alt="f212" class="genericon genericon-vimeo"></div>
<div alt="f213" class="genericon genericon-youtube"></div>
<div alt="f214" class="genericon genericon-tumblr"></div>
<div alt="f215" class="genericon genericon-instagram"></div>
<div alt="f216" class="genericon genericon-codepen"></div>
<div alt="f217" class="genericon genericon-polldaddy"></div>
<div alt="f218" class="genericon genericon-googleplus-alt"></div>
<div alt="f219" class="genericon genericon-path"></div>
<div alt="f220" class="genericon genericon-skype"></div>
<div alt="f221" class="genericon genericon-digg"></div>
<div alt="f222" class="genericon genericon-reddit"></div>
<div alt="f223" class="genericon genericon-stumbleupon"></div>
<div alt="f224" class="genericon genericon-pocket"></div>
<div alt="f225" class="genericon genericon-dropbox"></div>
<!-- meta icons -->
<div alt="f300" class="genericon genericon-comment"></div>
<div alt="f301" class="genericon genericon-category"></div>
<div alt="f302" class="genericon genericon-tag"></div>
<div alt="f303" class="genericon genericon-time"></div>
<div alt="f304" class="genericon genericon-user"></div>
<div alt="f305" class="genericon genericon-day"></div>
<div alt="f306" class="genericon genericon-week"></div>
<div alt="f307" class="genericon genericon-month"></div>
<div alt="f308" class="genericon genericon-pinned"></div>
<!-- other icons -->
<div alt="f400" class="genericon genericon-search"></div>
<div alt="f401" class="genericon genericon-unzoom"></div>
<div alt="f402" class="genericon genericon-zoom"></div>
<div alt="f403" class="genericon genericon-show"></div>
<div alt="f404" class="genericon genericon-hide"></div>
<div alt="f405" class="genericon genericon-close"></div>
<div alt="f406" class="genericon genericon-close-alt"></div>
<div alt="f407" class="genericon genericon-trash"></div>
<div alt="f408" class="genericon genericon-star"></div>
<div alt="f409" class="genericon genericon-home"></div>
<div alt="f410" class="genericon genericon-mail"></div>
<div alt="f411" class="genericon genericon-edit"></div>
<div alt="f412" class="genericon genericon-reply"></div>
<div alt="f413" class="genericon genericon-feed"></div>
<div alt="f414" class="genericon genericon-warning"></div>
<div alt="f415" class="genericon genericon-share"></div>
<div alt="f416" class="genericon genericon-attachment"></div>
<div alt="f417" class="genericon genericon-location"></div>
<div alt="f418" class="genericon genericon-checkmark"></div>
<div alt="f419" class="genericon genericon-menu"></div>
<div alt="f420" class="genericon genericon-refresh"></div>
<div alt="f421" class="genericon genericon-minimize"></div>
<div alt="f422" class="genericon genericon-maximize"></div>
<div alt="f423" class="genericon genericon-404"></div>
<div alt="f424" class="genericon genericon-spam"></div>
<div alt="f425" class="genericon genericon-summary"></div>
<div alt="f426" class="genericon genericon-cloud"></div>
<div alt="f427" class="genericon genericon-key"></div>
<div alt="f428" class="genericon genericon-dot"></div>
<div alt="f429" class="genericon genericon-next"></div>
<div alt="f430" class="genericon genericon-previous"></div>
<div alt="f431" class="genericon genericon-expand"></div>
<div alt="f432" class="genericon genericon-collapse"></div>
<div alt="f433" class="genericon genericon-dropdown"></div>
<div alt="f434" class="genericon genericon-dropdown-left"></div>
<div alt="f435" class="genericon genericon-top"></div>
<div alt="f436" class="genericon genericon-draggable"></div>
<div alt="f437" class="genericon genericon-phone"></div>
<div alt="f438" class="genericon genericon-send-to-phone"></div>
<div alt="f439" class="genericon genericon-plugin"></div>
<div alt="f440" class="genericon genericon-cloud-download"></div>
<div alt="f441" class="genericon genericon-cloud-upload"></div>
<div alt="f442" class="genericon genericon-external"></div>
<div alt="f443" class="genericon genericon-document"></div>
<div alt="f444" class="genericon genericon-book"></div>
<div alt="f445" class="genericon genericon-cog"></div>
<div alt="f446" class="genericon genericon-unapprove"></div>
<div alt="f447" class="genericon genericon-cart"></div>
<div alt="f448" class="genericon genericon-pause"></div>
<div alt="f449" class="genericon genericon-stop"></div>
<div alt="f450" class="genericon genericon-skip-back"></div>
<div alt="f451" class="genericon genericon-skip-ahead"></div>
<div alt="f452" class="genericon genericon-play"></div>
<div alt="f453" class="genericon genericon-tablet"></div>
<div alt="f454" class="genericon genericon-send-to-tablet"></div>
<div alt="f455" class="genericon genericon-info"></div>
<div alt="f456" class="genericon genericon-notice"></div>
<div alt="f457" class="genericon genericon-help"></div>
<div alt="f458" class="genericon genericon-fastforward"></div>
<div alt="f459" class="genericon genericon-rewind"></div>
<div alt="f460" class="genericon genericon-portfolio"></div>
<div alt="f461" class="genericon genericon-heart"></div>
<div alt="f462" class="genericon genericon-code"></div>
<div alt="f463" class="genericon genericon-subscribe"></div>
<div alt="f464" class="genericon genericon-unsubscribe"></div>
<div alt="f465" class="genericon genericon-subscribed"></div>
<div alt="f466" class="genericon genericon-reply-alt"></div>
<div alt="f467" class="genericon genericon-reply-single"></div>
<div alt="f468" class="genericon genericon-flag"></div>
<div alt="f469" class="genericon genericon-print"></div>
<div alt="f470" class="genericon genericon-lock"></div>
<div alt="f471" class="genericon genericon-bold"></div>
<div alt="f472" class="genericon genericon-italic"></div>
<div alt="f473" class="genericon genericon-picture"></div>
<div alt="f474" class="genericon genericon-fullscreen"></div>
<!-- generic shapes -->
<div alt="f500" class="genericon genericon-uparrow"></div>
<div alt="f501" class="genericon genericon-rightarrow"></div>
<div alt="f502" class="genericon genericon-downarrow"></div>
<div alt="f503" class="genericon genericon-leftarrow"></div>
</div>
<p>If you want to insert an icon manually using the <code>:before</code> selector, you can setup CSS rules like the following example. <strong>Make sure to set the size to a multiple of 16px</strong> or the icons could end up looking fuzzy:</p>
<p><textarea class="code" style="min-height: 150px;" onclick="select();">.my-icon:before {
content: '\f408';
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 32px/1 'Genericons';
vertical-align: middle;
}</textarea></p>
<p>Add a matching class to your HTML:</p>
<p><code>&lt;div class="my-icon"&gt;You're a Star!&lt;/div&gt;</code></p>
<p>Here's the result: <span class="my-icon">You're a Star!</span></p>
<h2>Examples</h2>
<p>Turn every icon a <span style="color: #fa8072;">Salmon</span> color:</p>
<p><textarea class="code" style="min-height: 70px" onclick="select();">
.genericon {
color: #fa8072;
}</textarea></p>
<p>Or turn the stars <span style="color: #ffd700;">Gold</span>:</p>
<p><textarea class="code" style="min-height: 70px" onclick="select();">
.genericon-star {
color: #fa8072;
}</textarea></p>
<p>Use icons for bulleted lists:</p>
<ul class="my-checklist">
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
</ul>
<p><textarea class="code" style="min-height: 130px" onclick="select();">
<ul class="my-checklist">
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
</ul></textarea></p>
<p><textarea class="code" style="min-height: 260px;" onclick="select();">
.my-checklist {
list-style-type: none;
text-indent: -16px;
}
.my-checklist li:before {
padding-right: 16px;
content: '\f418';
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 16px/1 'Genericons';
vertical-align: text-top;
}</textarea></p>
<p>Use icons to style blockquotes:</p>
<blockquote class="my-blockquote">Sometimes I've believed as many as six impossible things before breakfast. &mdash;<em>Lewis Carroll</em></blockquote>
<blockquote class="my-blockquote">`Twas brillig, and the slithy toves Did gyre and gimble in the wabe: All mimsy were the borogoves, And the mome raths outgrabe. "Beware the Jabberwock, my son! The jaws that bite, the claws that catch! Beware the Jubjub bird, and shun The frumious Bandersnatch!"</blockquote>
<p><textarea class="code" style="min-height: 40px;" onclick="select();"><blockquote class="my-blockquote">Sometimes I've believed as many as six impossible things before breakfast. &mdash;<em>Lewis Carroll</em></blockquote></textarea></p>
<p><textarea class="code" style="min-height: 300px;" onclick="select();">
.my-blockquote {
background: #eee;
border-left: 32px solid #ddd;
padding: 10px;
}
.my-blockquote:before {
margin-left: -42px;
padding-right: 10px;
content: '\f106';
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 32px/20px 'Genericons';
vertical-align: bottom;
} </textarea></p>
<p>Use icons to style buttons:</p>
<a class="my-button" href="javascript:void()"><i class="genericon genericon-show"></i> View</a>
<a class="my-button" href="javascript:void()"><i class="genericon genericon-audio"></i> Listen</a>
<p><textarea class="code" style="min-height: 40px;" onclick="select();"><a class="my-button" href="#"><i class="genericon genericon-show"></i> View</a>
<a class="my-button" href="#"><i class="genericon genericon-audio"></i> Listen</a></textarea></p>
<p><textarea class="code" style="min-height: 300px;" onclick="select();">
.my-button {
font-family: Helvetica, sans-serif;
background: #e05d22; /* Old browsers */
background: -webkit-linear-gradient(top, #e05d22 0%, #d94412 100%); /* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient( top, #e05d22 0%, #d94412 100%); /* FF3.6+ */
background: -ms-linear-gradient( top, #e05d22 0%, #d94412 100%); /* IE10+ */
background: -o-linear-gradient( top, #e05d22 0%, #d94412 100%); /* Opera 11.10+ */
background: linear-gradient( to bottom, #e05d22 0%, #d94412 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e05d22', endColorstr='#d94412', GradientType=0); /* IE6-9 */
display: inline-block;
padding: 10px 16px 6px 16px;
color: #fff;
text-decoration: none;
border: none;
border-bottom: 3px solid #b93207;
border-radius: 2px;
}
.my-button:hover,
.my-button:focus {
background: #ed6a31; /* Old browsers */
background: -webkit-linear-gradient(top, #ed6a31 0%, #e55627 100%); /* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient( top, #ed6a31 0%, #e55627 100%); /* FF3.6+ */
background: -ms-linear-gradient( top, #ed6a31 0%, #e55627 100%); /* IE10+ */
background: -o-linear-gradient( top, #ed6a31 0%, #e55627 100%); /* Opera 11.10+ */
background: linear-gradient( to bottom, #ed6a31 0%, #e55627 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ed6a31', endColorstr='#e55627', GradientType=0); /* IE6-9 */
outline: none;
}
.my-button:active {
background: #d94412; /* Old browsers */
background: -webkit-linear-gradient(top, #d94412 0%, #e05d22 100%); /* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient( top, #d94412 0%, #e05d22 100%); /* FF3.6+ */
background: -ms-linear-gradient( top, #d94412 0%, #e05d22 100%); /* IE10+ */
background: -o-linear-gradient( top, #d94412 0%, #e05d22 100%); /* Opera 11.10+ */
background: linear-gradient( to bottom, #d94412 0%, #e05d22 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#d94412', endColorstr='#e05d22', GradientType=0); /* IE6-9 */
border: none;
border-top: 3px solid #b93207;
padding: 6px 16px 10px 16px;
}</textarea>/</p>
<h2>CSS Preprocessors</h2>
<p>Preprocessing extensions such as Sass (SCSS Syntax) or LESS</a> can make it easier to manage CSS for a lot of things at once using things like variables and mixins.</p>
<p>This example will seup the basic genericon rules and sets a color you can use for all icons using Sass:</p>
<p><textarea class="code" style="min-height: 360px;" onclick="select();">$icon-color: "#fa8072";
.genericon {
color: $icon-color;
}
@mixin genericon-rules {
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 16px/1 'Genericons';
vertical-align: middle;
}
.my-icon:before {
content: '\f408';
@include genericon-rules;
}</textarea></p>
<p>Here is a similar example for LESS:</p>
<p><textarea class="code" style="min-height: 360px;" onclick="select();">@icon-color: "#fa8072";
.genericon {
color: @icon-color;
}
.genericon-rules {
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 16px/1 'Genericons';
vertical-align: middle;
}
.my-icon:before {
content: '\f408';
.genericon-rules;
}</textarea></p>
<h2>Fallback images for IE7 and below</h2>
<p>Genericons <strong>does not come with fallback icons by default</strong> -- therefore you have to create them yourself. If you are using HTML similar to this example:
<p><code>&lt;span class="genericon genericon-warning"&gt;&lt;/span&gt;</code></p>
<p>You can use the asterisk hack to serve a different icon to IE7 once you have saved the fallback icons to your project:</p>
<textarea class="code" style="min-height: 85px;" onclick="select();">.genericon-warning {
*background: url(fallback-icon.png) no-repeat center center;
*text-indent: 100%;
}</textarea>
</div>
</body>
</html>

View File

@@ -1143,8 +1143,10 @@ function map_meta_cap( $cap, $user_id ) {
case 'edit_post':
case 'edit_page':
$post = get_post( $args[0] );
if ( empty( $post ) )
if ( empty( $post ) ) {
$caps[] = 'do_not_allow';
break;
}
if ( 'revision' == $post->post_type ) {
$post = get_post( $post->post_parent );
@@ -1258,7 +1260,16 @@ function map_meta_cap( $cap, $user_id ) {
if ( empty( $comment ) )
break;
$post = get_post( $comment->comment_post_ID );
$caps = map_meta_cap( 'edit_post', $user_id, $post->ID );
/*
* If the post doesn't exist, we have an orphaned comment.
* Fall back to the edit_posts capability, instead.
*/
if ( $post ) {
$caps = map_meta_cap( 'edit_post', $user_id, $post->ID );
} else {
$caps = map_meta_cap( 'edit_posts', $user_id );
}
break;
case 'unfiltered_upload':
if ( defined('ALLOW_UNFILTERED_UPLOADS') && ALLOW_UNFILTERED_UPLOADS && ( !is_multisite() || is_super_admin( $user_id ) ) )

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -999,20 +999,23 @@ class Snoopy
if(!empty($this->user) || !empty($this->pass))
$headers[] = "Authorization: BASIC ".base64_encode($this->user.":".$this->pass);
for($curr_header = 0; $curr_header < count($headers); $curr_header++) {
$safer_header = strtr( $headers[$curr_header], "\"", " " );
$cmdline_params .= " -H \"".$safer_header."\"";
$headerfile = tempnam( $this->temp_dir, "sno" );
$cmdline_params = '-k -D ' . escapeshellarg( $headerfile );
foreach ( $headers as $header ) {
$cmdline_params .= ' -H ' . escapeshellarg( $header );
}
if(!empty($body))
$cmdline_params .= " -d \"$body\"";
if ( ! empty( $body ) ) {
$cmdline_params .= ' -d ' . escapeshellarg( $body );
}
if($this->read_timeout > 0)
$cmdline_params .= " -m ".$this->read_timeout;
if ( $this->read_timeout > 0 ) {
$cmdline_params .= ' -m ' . escapeshellarg( $this->read_timeout );
}
$headerfile = tempnam($this->temp_dir, "sno");
exec($this->curl_path." -k -D \"$headerfile\"".$cmdline_params." \"".escapeshellcmd($URI)."\"",$results,$return);
exec( $this->curl_path . ' ' . $cmdline_params . ' ' . escapeshellarg( $URI ), $results, $return );
if($return)
{

View File

@@ -1124,7 +1124,7 @@ final class WP_Customize_Widgets {
return null;
}
if ( $this->get_instance_hash_key( $decoded ) !== $value['instance_hash_key'] ) {
if ( ! hash_equals( $this->get_instance_hash_key( $decoded ), $value['instance_hash_key'] ) ) {
return null;
}

View File

@@ -57,7 +57,7 @@ class WP_Embed {
add_shortcode( 'embed', array( $this, 'shortcode' ) );
// Do the shortcode (only the [embed] one is registered)
$content = do_shortcode( $content );
$content = do_shortcode( $content, true );
// Put the original shortcodes back
$shortcode_tags = $orig_shortcode_tags;
@@ -312,7 +312,14 @@ class WP_Embed {
* @return string Potentially modified $content.
*/
public function autoembed( $content ) {
return preg_replace_callback( '|^(\s*)(https?://[^\s"]+)(\s*)$|im', array( $this, 'autoembed_callback' ), $content );
// Replace line breaks from all HTML elements with placeholders.
$content = wp_replace_in_html_tags( $content, array( "\n" => '<!-- wp-line-break -->' ) );
// Find URLs that are on their own line.
$content = preg_replace_callback( '|^(\s*)(https?://[^\s"]+)(\s*)$|im', array( $this, 'autoembed_callback' ), $content );
// Put the line breaks back.
return str_replace( '<!-- wp-line-break -->', "\n", $content );
}
/**

View File

@@ -217,7 +217,7 @@ final class WP_Theme implements ArrayAccess {
} elseif ( ! file_exists( $this->theme_root . '/' . $theme_file ) ) {
$this->headers['Name'] = $this->stylesheet;
if ( ! file_exists( $this->theme_root . '/' . $this->stylesheet ) )
$this->errors = new WP_Error( 'theme_not_found', sprintf( __( 'The theme directory "%s" does not exist.' ), $this->stylesheet ) );
$this->errors = new WP_Error( 'theme_not_found', sprintf( __( 'The theme directory "%s" does not exist.' ), esc_html( $this->stylesheet ) ) );
else
$this->errors = new WP_Error( 'theme_no_stylesheet', __( 'Stylesheet is missing.' ) );
$this->template = $this->stylesheet;
@@ -264,7 +264,7 @@ final class WP_Theme implements ArrayAccess {
$theme_root_template = $directories[ $this->template ]['theme_root'];
} else {
// Parent theme is missing.
$this->errors = new WP_Error( 'theme_no_parent', sprintf( __( 'The parent theme is missing. Please install the "%s" parent theme.' ), $this->template ) );
$this->errors = new WP_Error( 'theme_no_parent', sprintf( __( 'The parent theme is missing. Please install the "%s" parent theme.' ), esc_html( $this->template ) ) );
$this->cache_add( 'theme', array( 'headers' => $this->headers, 'errors' => $this->errors, 'stylesheet' => $this->stylesheet, 'template' => $this->template ) );
$this->parent = new WP_Theme( $this->template, $this->theme_root, $this );
return;
@@ -276,11 +276,11 @@ final class WP_Theme implements ArrayAccess {
// If we are a parent, then there is a problem. Only two generations allowed! Cancel things out.
if ( $_child instanceof WP_Theme && $_child->template == $this->stylesheet ) {
$_child->parent = null;
$_child->errors = new WP_Error( 'theme_parent_invalid', sprintf( __( 'The "%s" theme is not a valid parent theme.' ), $_child->template ) );
$_child->errors = new WP_Error( 'theme_parent_invalid', sprintf( __( 'The "%s" theme is not a valid parent theme.' ), esc_html( $_child->template ) ) );
$_child->cache_add( 'theme', array( 'headers' => $_child->headers, 'errors' => $_child->errors, 'stylesheet' => $_child->stylesheet, 'template' => $_child->template ) );
// The two themes actually reference each other with the Template header.
if ( $_child->stylesheet == $this->template ) {
$this->errors = new WP_Error( 'theme_parent_invalid', sprintf( __( 'The "%s" theme is not a valid parent theme.' ), $this->template ) );
$this->errors = new WP_Error( 'theme_parent_invalid', sprintf( __( 'The "%s" theme is not a valid parent theme.' ), esc_html( $this->template ) ) );
$this->cache_add( 'theme', array( 'headers' => $this->headers, 'errors' => $this->errors, 'stylesheet' => $this->stylesheet, 'template' => $this->template ) );
}
return;
@@ -658,8 +658,9 @@ final class WP_Theme implements ArrayAccess {
private function markup_header( $header, $value, $translate ) {
switch ( $header ) {
case 'Name' :
if ( empty( $value ) )
$value = $this->get_stylesheet();
if ( empty( $value ) ) {
$value = esc_html( $this->get_stylesheet() );
}
break;
case 'Description' :
$value = wptexturize( $value );

View File

@@ -1150,6 +1150,56 @@ class wp_xmlrpc_server extends IXR_Server {
return $count > 1;
}
private function _validate_boolean( $var ) {
if ( is_bool( $var ) ) {
return $var;
}
if ( is_string( $var ) && 'false' === strtolower( $var ) ) {
return false;
}
return (bool) $var;
}
/**
* Encapsulate the logic for sticking a post
* and determining if the user has permission to do so
*
* @since 4.3.0
* @access private
*
* @param array $post_data
* @param bool $update
* @return void|IXR_Error
*/
private function _toggle_sticky( $post_data, $update = false ) {
$post_type = get_post_type_object( $post_data['post_type'] );
// Private and password-protected posts cannot be stickied.
if ( 'private' === $post_data['post_status'] || ! empty( $post_data['post_password'] ) ) {
// Error if the client tried to stick the post, otherwise, silently unstick.
if ( ! empty( $post_data['sticky'] ) ) {
return new IXR_Error( 401, __( 'Sorry, you cannot stick a private post.' ) );
}
if ( $update ) {
unstick_post( $post_data['ID'] );
}
} elseif ( isset( $post_data['sticky'] ) ) {
if ( ! current_user_can( $post_type->cap->edit_others_posts ) ) {
return new IXR_Error( 401, __( 'Sorry, you are not allowed to stick this post.' ) );
}
$sticky = $this->_validate_boolean( $post_data['sticky'] );
if ( $sticky ) {
stick_post( $post_data['ID'] );
} else {
unstick_post( $post_data['ID'] );
}
}
}
/**
* Helper method for wp_newPost and wp_editPost, containing shared logic.
*
@@ -1242,20 +1292,9 @@ class wp_xmlrpc_server extends IXR_Server {
$post_ID = $post_data['ID'];
if ( $post_data['post_type'] == 'post' ) {
// Private and password-protected posts cannot be stickied.
if ( $post_data['post_status'] == 'private' || ! empty( $post_data['post_password'] ) ) {
// Error if the client tried to stick the post, otherwise, silently unstick.
if ( ! empty( $post_data['sticky'] ) )
return new IXR_Error( 401, __( 'Sorry, you cannot stick a private post.' ) );
if ( $update )
unstick_post( $post_ID );
} elseif ( isset( $post_data['sticky'] ) ) {
if ( ! current_user_can( $post_type->cap->edit_others_posts ) )
return new IXR_Error( 401, __( 'Sorry, you are not allowed to stick this post.' ) );
if ( $post_data['sticky'] )
stick_post( $post_ID );
else
unstick_post( $post_ID );
$error = $this->_toggle_sticky( $post_data, $update );
if ( $error ) {
return $error;
}
}
@@ -4580,10 +4619,12 @@ class wp_xmlrpc_server extends IXR_Server {
// Only posts can be sticky
if ( $post_type == 'post' && isset( $content_struct['sticky'] ) ) {
if ( $content_struct['sticky'] == true )
stick_post( $post_ID );
elseif ( $content_struct['sticky'] == false )
unstick_post( $post_ID );
$data = $postdata;
$data['sticky'] = $content_struct['sticky'];
$error = $this->_toggle_sticky( $data );
if ( $error ) {
return $error;
}
}
if ( isset($content_struct['custom_fields']) )
@@ -4873,8 +4914,8 @@ class wp_xmlrpc_server extends IXR_Server {
$tags_input = isset( $content_struct['mt_keywords'] ) ? $content_struct['mt_keywords'] : null;
if ( ('publish' == $post_status) ) {
if ( ( 'page' == $post_type ) && ! current_user_can( 'publish_pages' ) ) {
if ( 'publish' == $post_status || 'private' == $post_status ) {
if ( 'page' == $post_type && ! current_user_can( 'publish_pages' ) ) {
return new IXR_Error( 401, __( 'Sorry, you do not have the right to publish this page.' ) );
} elseif ( ! current_user_can( 'publish_posts' ) ) {
return new IXR_Error( 401, __( 'Sorry, you do not have the right to publish this post.' ) );
@@ -4918,10 +4959,13 @@ class wp_xmlrpc_server extends IXR_Server {
// Only posts can be sticky
if ( $post_type == 'post' && isset( $content_struct['sticky'] ) ) {
if ( $content_struct['sticky'] == true )
stick_post( $post_ID );
elseif ( $content_struct['sticky'] == false )
unstick_post( $post_ID );
$data = $newpost;
$data['sticky'] = $content_struct['sticky'];
$data['post_type'] = 'post';
$error = $this->_toggle_sticky( $data, true );
if ( $error ) {
return $error;
}
}
if ( isset($content_struct['custom_fields']) )

View File

@@ -2252,6 +2252,9 @@ function comment_form( $args = array(), $post_id = null ) {
*/
$args = wp_parse_args( $args, apply_filters( 'comment_form_defaults', $defaults ) );
// Ensure that the filtered args contain all required default values.
$args = array_merge( $defaults, $args );
if ( comments_open( $post_id ) ) : ?>
<?php
/**

View File

@@ -2118,17 +2118,7 @@ function wp_insert_comment( $commentdata ) {
$compacted = compact( 'comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_author_IP', 'comment_date', 'comment_date_gmt', 'comment_content', 'comment_karma', 'comment_approved', 'comment_agent', 'comment_type', 'comment_parent', 'user_id' );
if ( ! $wpdb->insert( $wpdb->comments, $compacted ) ) {
$fields = array( 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content' );
foreach( $fields as $field ) {
if ( isset( $compacted[ $field ] ) ) {
$compacted[ $field ] = $wpdb->strip_invalid_text_for_column( $wpdb->comments, $field, $compacted[ $field ] );
}
}
if ( ! $wpdb->insert( $wpdb->comments, $compacted ) ) {
return false;
}
return false;
}
$id = (int) $wpdb->insert_id;
@@ -2252,6 +2242,8 @@ function wp_throttle_comment_flood($block, $time_lastcomment, $time_newcomment)
* @return int|bool The ID of the comment on success, false on failure.
*/
function wp_new_comment( $commentdata ) {
global $wpdb;
if ( isset( $commentdata['user_ID'] ) ) {
$commentdata['user_id'] = $commentdata['user_ID'] = (int) $commentdata['user_ID'];
}
@@ -2295,7 +2287,22 @@ function wp_new_comment( $commentdata ) {
$comment_ID = wp_insert_comment($commentdata);
if ( ! $comment_ID ) {
return false;
$fields = array( 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content' );
foreach( $fields as $field ) {
if ( isset( $commentdata[ $field ] ) ) {
$commentdata[ $field ] = $wpdb->strip_invalid_text_for_column( $wpdb->comments, $field, $commentdata[ $field ] );
}
}
$commentdata = wp_filter_comment( $commentdata );
$commentdata['comment_approved'] = wp_allow_comment( $commentdata );
$comment_ID = wp_insert_comment( $commentdata );
if ( ! $comment_ID ) {
return false;
}
}
/**

View File

@@ -13,23 +13,85 @@ if ( !function_exists('_') ) {
}
}
/**
* Returns whether PCRE/u (PCRE_UTF8 modifier) is available for use.
*
* @ignore
* @since 4.2.2
* @access private
*
* @param bool $set - Used for testing only
* null : default - get PCRE/u capability
* false : Used for testing - return false for future calls to this function
* 'reset': Used for testing - restore default behavior of this function
*/
function _wp_can_use_pcre_u( $set = null ) {
static $utf8_pcre = 'reset';
if ( null !== $set ) {
$utf8_pcre = $set;
}
if ( 'reset' === $utf8_pcre ) {
$utf8_pcre = @preg_match( '/^./u', 'a' );
}
return $utf8_pcre;
}
if ( ! function_exists( 'mb_substr' ) ) :
function mb_substr( $str, $start, $length = null, $encoding = null ) {
return _mb_substr( $str, $start, $length, $encoding );
}
endif;
/*
* Only understands UTF-8 and 8bit. All other character sets will be treated as 8bit.
* For $encoding === UTF-8, the $str input is expected to be a valid UTF-8 byte sequence.
* The behavior of this function for invalid inputs is undefined.
*/
function _mb_substr( $str, $start, $length = null, $encoding = null ) {
if ( null === $encoding ) {
$encoding = get_option( 'blog_charset' );
}
// The solution below works only for UTF-8,
// so in case of a different charset just use built-in substr()
$charset = get_option( 'blog_charset' );
if ( ! in_array( $charset, array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ) ) {
if ( ! in_array( $encoding, array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ) ) {
return is_null( $length ) ? substr( $str, $start ) : substr( $str, $start, $length );
}
// Use the regex unicode support to separate the UTF-8 characters into an array
preg_match_all( '/./us', $str, $match );
$chars = is_null( $length ) ? array_slice( $match[0], $start ) : array_slice( $match[0], $start, $length );
return implode( '', $chars );
if ( _wp_can_use_pcre_u() ) {
// Use the regex unicode support to separate the UTF-8 characters into an array
preg_match_all( '/./us', $str, $match );
$chars = is_null( $length ) ? array_slice( $match[0], $start ) : array_slice( $match[0], $start, $length );
return implode( '', $chars );
}
$regex = '/(
[\x00-\x7F] # single-byte sequences 0xxxxxxx
| [\xC2-\xDF][\x80-\xBF] # double-byte sequences 110xxxxx 10xxxxxx
| \xE0[\xA0-\xBF][\x80-\xBF] # triple-byte sequences 1110xxxx 10xxxxxx * 2
| [\xE1-\xEC][\x80-\xBF]{2}
| \xED[\x80-\x9F][\x80-\xBF]
| [\xEE-\xEF][\x80-\xBF]{2}
| \xF0[\x90-\xBF][\x80-\xBF]{2} # four-byte sequences 11110xxx 10xxxxxx * 3
| [\xF1-\xF3][\x80-\xBF]{3}
| \xF4[\x80-\x8F][\x80-\xBF]{2}
)/x';
$chars = array( '' ); // Start with 1 element instead of 0 since the first thing we do is pop
do {
// We had some string left over from the last round, but we counted it in that last round.
array_pop( $chars );
// Split by UTF-8 character, limit to 1000 characters (last array element will contain the rest of the string)
$pieces = preg_split( $regex, $str, 1000, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY );
$chars = array_merge( $chars, $pieces );
} while ( count( $pieces ) > 1 && $str = array_pop( $pieces ) ); // If there's anything left over, repeat the loop.
return join( '', array_slice( $chars, $start, $length ) );
}
if ( ! function_exists( 'mb_strlen' ) ) :
@@ -38,16 +100,54 @@ if ( ! function_exists( 'mb_strlen' ) ) :
}
endif;
/*
* Only understands UTF-8 and 8bit. All other character sets will be treated as 8bit.
* For $encoding === UTF-8, the $str input is expected to be a valid UTF-8 byte sequence.
* The behavior of this function for invalid inputs is undefined.
*/
function _mb_strlen( $str, $encoding = null ) {
if ( null === $encoding ) {
$encoding = get_option( 'blog_charset' );
}
// The solution below works only for UTF-8,
// so in case of a different charset just use built-in strlen()
$charset = get_option( 'blog_charset' );
if ( ! in_array( $charset, array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ) ) {
if ( ! in_array( $encoding, array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ) ) {
return strlen( $str );
}
// Use the regex unicode support to separate the UTF-8 characters into an array
preg_match_all( '/./us', $str, $match );
return count( $match[0] );
if ( _wp_can_use_pcre_u() ) {
// Use the regex unicode support to separate the UTF-8 characters into an array
preg_match_all( '/./us', $str, $match );
return count( $match[0] );
}
$regex = '/(?:
[\x00-\x7F] # single-byte sequences 0xxxxxxx
| [\xC2-\xDF][\x80-\xBF] # double-byte sequences 110xxxxx 10xxxxxx
| \xE0[\xA0-\xBF][\x80-\xBF] # triple-byte sequences 1110xxxx 10xxxxxx * 2
| [\xE1-\xEC][\x80-\xBF]{2}
| \xED[\x80-\x9F][\x80-\xBF]
| [\xEE-\xEF][\x80-\xBF]{2}
| \xF0[\x90-\xBF][\x80-\xBF]{2} # four-byte sequences 11110xxx 10xxxxxx * 3
| [\xF1-\xF3][\x80-\xBF]{3}
| \xF4[\x80-\x8F][\x80-\xBF]{2}
)/x';
$count = 1; // Start at 1 instead of 0 since the first thing we do is decrement
do {
// We had some string left over from the last round, but we counted it in that last round.
$count--;
// Split by UTF-8 character, limit to 1000 characters (last array element will contain the rest of the string)
$pieces = preg_split( $regex, $str, 1000 );
// Increment
$count += count( $pieces );
} while ( $str = array_pop( $pieces ) ); // If there's anything left over, repeat the loop.
// Fencepost: preg_split() always returns one extra item in the array
return --$count;
}
if ( !function_exists('hash_hmac') ):

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
#wp-auth-check-wrap.hidden{display:none}#wp-auth-check-wrap #wp-auth-check-bg{position:fixed;top:0;bottom:0;right:0;left:0;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:1000010}#wp-auth-check-wrap #wp-auth-check{position:fixed;right:50%;overflow:hidden;top:40px;bottom:20px;max-height:415px;width:380px;margin:0 -190px 0 0;padding:30px 0 0;background-color:#f1f1f1;z-index:1000011;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3)}@media screen and (max-width:380px){#wp-auth-check-wrap #wp-auth-check{right:0;width:100%;margin:0}}#wp-auth-check-wrap.fallback #wp-auth-check{max-height:180px;overflow:auto}#wp-auth-check-wrap #wp-auth-check-form{background:url(../images/spinner-2x.gif) no-repeat center center;-webkit-background-size:16px 16px;background-size:16px 16px;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}#wp-auth-check-wrap #wp-auth-check-form iframe{height:98%;width:100%}#wp-auth-check-wrap .wp-auth-check-close{position:absolute;top:8px;left:8px;height:22px;width:22px;cursor:pointer}#wp-auth-check-wrap .wp-auth-check-close:before{content:'\f158';display:block!important;font:400 20px/1 dashicons;speak:none;height:22px;margin:2px 0;text-align:center;width:22px;color:#777;-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale}#wp-auth-check-wrap .wp-auth-check-close:hover:before{color:#0073aa}#wp-auth-check-wrap .wp-auth-check-close:focus{outline:#82878c dotted 1px}#wp-auth-check-wrap .wp-auth-fallback-expired{outline:0}#wp-auth-check-wrap .wp-auth-fallback{font-size:14px;line-height:21px;padding:0 25px;display:none}#wp-auth-check-wrap.fallback .wp-auth-check-close,#wp-auth-check-wrap.fallback .wp-auth-fallback{display:block}
#wp-auth-check-wrap.hidden{display:none}#wp-auth-check-wrap #wp-auth-check-bg{position:fixed;top:0;bottom:0;right:0;left:0;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:1000010}#wp-auth-check-wrap #wp-auth-check{position:fixed;right:50%;overflow:hidden;top:40px;bottom:20px;max-height:415px;width:380px;margin:0 -190px 0 0;padding:30px 0 0;background-color:#f1f1f1;z-index:1000011;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3)}@media screen and (max-width:380px){#wp-auth-check-wrap #wp-auth-check{right:0;width:100%;margin:0}}#wp-auth-check-wrap.fallback #wp-auth-check{max-height:180px;overflow:auto}#wp-auth-check-wrap #wp-auth-check-form{background:url(../images/spinner-2x.gif) center center/16px 16px no-repeat;-webkit-background-size:16px 16px;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}#wp-auth-check-wrap #wp-auth-check-form iframe{height:98%;width:100%}#wp-auth-check-wrap .wp-auth-check-close{position:absolute;top:8px;left:8px;height:22px;width:22px;cursor:pointer}#wp-auth-check-wrap .wp-auth-check-close:before{content:'\f158';display:block!important;font:400 20px/1 dashicons;speak:none;height:22px;margin:2px 0;text-align:center;width:22px;color:#777;-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale}#wp-auth-check-wrap .wp-auth-check-close:hover:before{color:#0073aa}#wp-auth-check-wrap .wp-auth-check-close:focus{outline:#82878c dotted 1px}#wp-auth-check-wrap .wp-auth-fallback-expired{outline:0}#wp-auth-check-wrap .wp-auth-fallback{font-size:14px;line-height:21px;padding:0 25px;display:none}#wp-auth-check-wrap.fallback .wp-auth-check-close,#wp-auth-check-wrap.fallback .wp-auth-fallback{display:block}

View File

@@ -1 +1 @@
#wp-auth-check-wrap.hidden{display:none}#wp-auth-check-wrap #wp-auth-check-bg{position:fixed;top:0;bottom:0;left:0;right:0;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:1000010}#wp-auth-check-wrap #wp-auth-check{position:fixed;left:50%;overflow:hidden;top:40px;bottom:20px;max-height:415px;width:380px;margin:0 0 0 -190px;padding:30px 0 0;background-color:#f1f1f1;z-index:1000011;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3)}@media screen and (max-width:380px){#wp-auth-check-wrap #wp-auth-check{left:0;width:100%;margin:0}}#wp-auth-check-wrap.fallback #wp-auth-check{max-height:180px;overflow:auto}#wp-auth-check-wrap #wp-auth-check-form{background:url(../images/spinner-2x.gif) no-repeat center center;-webkit-background-size:16px 16px;background-size:16px 16px;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}#wp-auth-check-wrap #wp-auth-check-form iframe{height:98%;width:100%}#wp-auth-check-wrap .wp-auth-check-close{position:absolute;top:8px;right:8px;height:22px;width:22px;cursor:pointer}#wp-auth-check-wrap .wp-auth-check-close:before{content:'\f158';display:block!important;font:400 20px/1 dashicons;speak:none;height:22px;margin:2px 0;text-align:center;width:22px;color:#777;-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale}#wp-auth-check-wrap .wp-auth-check-close:hover:before{color:#0073aa}#wp-auth-check-wrap .wp-auth-check-close:focus{outline:#82878c dotted 1px}#wp-auth-check-wrap .wp-auth-fallback-expired{outline:0}#wp-auth-check-wrap .wp-auth-fallback{font-size:14px;line-height:21px;padding:0 25px;display:none}#wp-auth-check-wrap.fallback .wp-auth-check-close,#wp-auth-check-wrap.fallback .wp-auth-fallback{display:block}
#wp-auth-check-wrap.hidden{display:none}#wp-auth-check-wrap #wp-auth-check-bg{position:fixed;top:0;bottom:0;left:0;right:0;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:1000010}#wp-auth-check-wrap #wp-auth-check{position:fixed;left:50%;overflow:hidden;top:40px;bottom:20px;max-height:415px;width:380px;margin:0 0 0 -190px;padding:30px 0 0;background-color:#f1f1f1;z-index:1000011;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3)}@media screen and (max-width:380px){#wp-auth-check-wrap #wp-auth-check{left:0;width:100%;margin:0}}#wp-auth-check-wrap.fallback #wp-auth-check{max-height:180px;overflow:auto}#wp-auth-check-wrap #wp-auth-check-form{background:url(../images/spinner-2x.gif) center center/16px 16px no-repeat;-webkit-background-size:16px 16px;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}#wp-auth-check-wrap #wp-auth-check-form iframe{height:98%;width:100%}#wp-auth-check-wrap .wp-auth-check-close{position:absolute;top:8px;right:8px;height:22px;width:22px;cursor:pointer}#wp-auth-check-wrap .wp-auth-check-close:before{content:'\f158';display:block!important;font:400 20px/1 dashicons;speak:none;height:22px;margin:2px 0;text-align:center;width:22px;color:#777;-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale}#wp-auth-check-wrap .wp-auth-check-close:hover:before{color:#0073aa}#wp-auth-check-wrap .wp-auth-check-close:focus{outline:#82878c dotted 1px}#wp-auth-check-wrap .wp-auth-fallback-expired{outline:0}#wp-auth-check-wrap .wp-auth-fallback{font-size:14px;line-height:21px;padding:0 25px;display:none}#wp-auth-check-wrap.fallback .wp-auth-check-close,#wp-auth-check-wrap.fallback .wp-auth-fallback{display:block}

View File

@@ -1410,7 +1410,7 @@ class WP_Widget_Tag_Cloud extends WP_Widget {
?>
<p>
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:') ?></label>
<input type="text" class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo $title; ?>" />
<input type="text" class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo esc_attr( $title ); ?>" />
</p>
<p>
<label for="<?php echo $this->get_field_id('nav_menu'); ?>"><?php _e('Select Menu:'); ?></label>

View File

@@ -419,7 +419,10 @@ function wpautop($pee, $br = true) {
$pee = preg_replace('!(</' . $allblocks . '>)!', "$1\n\n", $pee);
// Standardize newline characters to "\n".
$pee = str_replace(array("\r\n", "\r"), "\n", $pee);
$pee = str_replace(array("\r\n", "\r"), "\n", $pee);
// Find newlines in all elements and add placeholders.
$pee = wp_replace_in_html_tags( $pee, array( "\n" => " <!-- wpnl --> " ) );
// Collapse line breaks before and after <option> elements so they don't get autop'd.
if ( strpos( $pee, '<option' ) !== false ) {
@@ -506,9 +509,109 @@ function wpautop($pee, $br = true) {
if ( !empty($pre_tags) )
$pee = str_replace(array_keys($pre_tags), array_values($pre_tags), $pee);
// Restore newlines in all elements.
$pee = str_replace( " <!-- wpnl --> ", "\n", $pee );
return $pee;
}
/**
* Separate HTML elements and comments from the text.
*
* @since 4.2.4
*
* @param string $input The text which has to be formatted.
* @return array The formatted text.
*/
function wp_html_split( $input ) {
static $regex;
if ( ! isset( $regex ) ) {
$comments =
'!' // Start of comment, after the <.
. '(?:' // Unroll the loop: Consume everything until --> is found.
. '-(?!->)' // Dash not followed by end of comment.
. '[^\-]*+' // Consume non-dashes.
. ')*+' // Loop possessively.
. '(?:-->)?'; // End of comment. If not found, match all input.
$cdata =
'!\[CDATA\[' // Start of comment, after the <.
. '[^\]]*+' // Consume non-].
. '(?:' // Unroll the loop: Consume everything until ]]> is found.
. '](?!]>)' // One ] not followed by end of comment.
. '[^\]]*+' // Consume non-].
. ')*+' // Loop possessively.
. '(?:]]>)?'; // End of comment. If not found, match all input.
$regex =
'/(' // Capture the entire match.
. '<' // Find start of element.
. '(?(?=!--)' // Is this a comment?
. $comments // Find end of comment.
. '|'
. '(?(?=!\[CDATA\[)' // Is this a comment?
. $cdata // Find end of comment.
. '|'
. '[^>]*>?' // Find end of element. If not found, match all input.
. ')'
. ')'
. ')/s';
}
return preg_split( $regex, $input, -1, PREG_SPLIT_DELIM_CAPTURE );
}
/**
* Replace characters or phrases within HTML elements only.
*
* @since 4.2.3
*
* @param string $haystack The text which has to be formatted.
* @param array $replace_pairs In the form array('from' => 'to', ...).
* @return string The formatted text.
*/
function wp_replace_in_html_tags( $haystack, $replace_pairs ) {
// Find all elements.
$textarr = wp_html_split( $haystack );
$changed = false;
// Optimize when searching for one item.
if ( 1 === count( $replace_pairs ) ) {
// Extract $needle and $replace.
foreach ( $replace_pairs as $needle => $replace );
// Loop through delimeters (elements) only.
for ( $i = 1, $c = count( $textarr ); $i < $c; $i += 2 ) {
if ( false !== strpos( $textarr[$i], $needle ) ) {
$textarr[$i] = str_replace( $needle, $replace, $textarr[$i] );
$changed = true;
}
}
} else {
// Extract all $needles.
$needles = array_keys( $replace_pairs );
// Loop through delimeters (elements) only.
for ( $i = 1, $c = count( $textarr ); $i < $c; $i += 2 ) {
foreach ( $needles as $needle ) {
if ( false !== strpos( $textarr[$i], $needle ) ) {
$textarr[$i] = strtr( $textarr[$i], $replace_pairs );
$changed = true;
// After one strtr() break out of the foreach loop and look at next element.
break;
}
}
}
}
if ( $changed ) {
$haystack = implode( $textarr );
}
return $haystack;
}
/**
* Newline preservation help function for wpautop
*
@@ -1105,7 +1208,8 @@ function remove_accents($string) {
* operating systems and special characters requiring special escaping
* to manipulate at the command line. Replaces spaces and consecutive
* dashes with a single dash. Trims period, dash and underscore from beginning
* and end of filename.
* and end of filename. It is not guaranteed that this function will return a
* filename that is allowed to be uploaded.
*
* @since 2.1.0
*
@@ -1130,6 +1234,14 @@ function sanitize_file_name( $filename ) {
$filename = preg_replace( '/[\r\n\t -]+/', '-', $filename );
$filename = trim( $filename, '.-_' );
if ( false === strpos( $filename, '.' ) ) {
$mime_types = wp_get_mime_types();
$filetype = wp_check_filetype( 'test.' . $filename, $mime_types );
if ( $filetype['ext'] === $filename ) {
$filename = 'unnamed-file.' . $filetype['ext'];
}
}
// Split the filename into a base and extension[s]
$parts = explode('.', $filename);
@@ -3327,16 +3439,19 @@ function wp_make_link_relative( $link ) {
*/
function sanitize_option($option, $value) {
global $wpdb;
$error = '';
switch ( $option ) {
case 'admin_email' :
case 'new_admin_email' :
$value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
$value = sanitize_email( $value );
if ( ! is_email( $value ) ) {
$value = get_option( $option ); // Resets option to stored value in the case of failed sanitization
if ( function_exists( 'add_settings_error' ) )
add_settings_error( $option, 'invalid_admin_email', __( 'The email address entered did not appear to be a valid email address. Please enter a valid email address.' ) );
if ( is_wp_error( $value ) ) {
$error = $value->get_error_message();
} else {
$value = sanitize_email( $value );
if ( ! is_email( $value ) ) {
$error = __( 'The email address entered did not appear to be a valid email address. Please enter a valid email address.' );
}
}
break;
@@ -3381,8 +3496,12 @@ function sanitize_option($option, $value) {
case 'blogdescription':
case 'blogname':
$value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
$value = wp_kses_post( $value );
$value = esc_html( $value );
if ( is_wp_error( $value ) ) {
$error = $value->get_error_message();
} else {
$value = wp_kses_post( $value );
$value = esc_html( $value );
}
break;
case 'blog_charset':
@@ -3404,8 +3523,12 @@ function sanitize_option($option, $value) {
case 'mailserver_pass':
case 'upload_path':
$value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
$value = strip_tags( $value );
$value = wp_kses_data( $value );
if ( is_wp_error( $value ) ) {
$error = $value->get_error_message();
} else {
$value = strip_tags( $value );
$value = wp_kses_data( $value );
}
break;
case 'ping_sites':
@@ -3421,23 +3544,27 @@ function sanitize_option($option, $value) {
case 'siteurl':
$value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
if ( (bool)preg_match( '#http(s?)://(.+)#i', $value) ) {
$value = esc_url_raw($value);
if ( is_wp_error( $value ) ) {
$error = $value->get_error_message();
} else {
$value = get_option( $option ); // Resets option to stored value in the case of failed sanitization
if ( function_exists('add_settings_error') )
add_settings_error('siteurl', 'invalid_siteurl', __('The WordPress address you entered did not appear to be a valid URL. Please enter a valid URL.'));
if ( preg_match( '#http(s?)://(.+)#i', $value ) ) {
$value = esc_url_raw( $value );
} else {
$error = __( 'The WordPress address you entered did not appear to be a valid URL. Please enter a valid URL.' );
}
}
break;
case 'home':
$value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
if ( (bool)preg_match( '#http(s?)://(.+)#i', $value) ) {
$value = esc_url_raw($value);
if ( is_wp_error( $value ) ) {
$error = $value->get_error_message();
} else {
$value = get_option( $option ); // Resets option to stored value in the case of failed sanitization
if ( function_exists('add_settings_error') )
add_settings_error('home', 'invalid_home', __('The Site address you entered did not appear to be a valid URL. Please enter a valid URL.'));
if ( preg_match( '#http(s?)://(.+)#i', $value ) ) {
$value = esc_url_raw( $value );
} else {
$error = __( 'The Site address you entered did not appear to be a valid URL. Please enter a valid URL.' );
}
}
break;
@@ -3453,38 +3580,45 @@ function sanitize_option($option, $value) {
case 'illegal_names':
$value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
if ( ! is_array( $value ) )
$value = explode( ' ', $value );
if ( is_wp_error( $value ) ) {
$error = $value->get_error_message();
} else {
if ( ! is_array( $value ) )
$value = explode( ' ', $value );
$value = array_values( array_filter( array_map( 'trim', $value ) ) );
$value = array_values( array_filter( array_map( 'trim', $value ) ) );
if ( ! $value )
$value = '';
if ( ! $value )
$value = '';
}
break;
case 'limited_email_domains':
case 'banned_email_domains':
$value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
if ( ! is_array( $value ) )
$value = explode( "\n", $value );
if ( is_wp_error( $value ) ) {
$error = $value->get_error_message();
} else {
if ( ! is_array( $value ) )
$value = explode( "\n", $value );
$domains = array_values( array_filter( array_map( 'trim', $value ) ) );
$value = array();
$domains = array_values( array_filter( array_map( 'trim', $value ) ) );
$value = array();
foreach ( $domains as $domain ) {
if ( ! preg_match( '/(--|\.\.)/', $domain ) && preg_match( '|^([a-zA-Z0-9-\.])+$|', $domain ) )
$value[] = $domain;
foreach ( $domains as $domain ) {
if ( ! preg_match( '/(--|\.\.)/', $domain ) && preg_match( '|^([a-zA-Z0-9-\.])+$|', $domain ) ) {
$value[] = $domain;
}
}
if ( ! $value )
$value = '';
}
if ( ! $value )
$value = '';
break;
case 'timezone_string':
$allowed_zones = timezone_identifiers_list();
if ( ! in_array( $value, $allowed_zones ) && ! empty( $value ) ) {
$value = get_option( $option ); // Resets option to stored value in the case of failed sanitization
if ( function_exists('add_settings_error') )
add_settings_error('timezone_string', 'invalid_timezone_string', __('The timezone you have entered is not valid. Please select a valid timezone.') );
$error = __( 'The timezone you have entered is not valid. Please select a valid timezone.' );
}
break;
@@ -3492,8 +3626,12 @@ function sanitize_option($option, $value) {
case 'category_base':
case 'tag_base':
$value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
$value = esc_url_raw( $value );
$value = str_replace( 'http://', '', $value );
if ( is_wp_error( $value ) ) {
$error = $value->get_error_message();
} else {
$value = esc_url_raw( $value );
$value = str_replace( 'http://', '', $value );
}
break;
case 'default_role' :
@@ -3504,13 +3642,24 @@ function sanitize_option($option, $value) {
case 'moderation_keys':
case 'blacklist_keys':
$value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
$value = explode( "\n", $value );
$value = array_filter( array_map( 'trim', $value ) );
$value = array_unique( $value );
$value = implode( "\n", $value );
if ( is_wp_error( $value ) ) {
$error = $value->get_error_message();
} else {
$value = explode( "\n", $value );
$value = array_filter( array_map( 'trim', $value ) );
$value = array_unique( $value );
$value = implode( "\n", $value );
}
break;
}
if ( ! empty( $error ) ) {
$value = get_option( $option );
if ( function_exists( 'add_settings_error' ) ) {
add_settings_error( $option, "invalid_{$option}", $error );
}
}
/**
* Filter an option value following sanitization.
*
@@ -4140,8 +4289,9 @@ function print_emoji_detection_script() {
);
$version = 'ver=' . $wp_version;
$develop_src = false !== strpos( $wp_version, '-src' );
if ( SCRIPT_DEBUG ) {
if ( $develop_src || ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ) {
$settings['source'] = array(
/** This filter is documented in wp-includes/class.wp-scripts.php */
'wpemoji' => apply_filters( 'script_loader_src', includes_url( "js/wp-emoji.js?$version" ), 'wpemoji' ),
@@ -4174,7 +4324,7 @@ function print_emoji_detection_script() {
?>
<script type="text/javascript">
window._wpemojiSettings = <?php echo wp_json_encode( $settings ); ?>;
!function(a,b,c){function d(a){var c=b.createElement("canvas"),d=c.getContext&&c.getContext("2d");return d&&d.fillText?(d.textBaseline="top",d.font="600 32px Arial","flag"===a?(d.fillText(String.fromCharCode(55356,56812,55356,56807),0,0),c.toDataURL().length>3e3):(d.fillText(String.fromCharCode(55357,56835),0,0),0!==d.getImageData(16,16,1,1).data[0])):!1}function e(a){var c=b.createElement("script");c.src=a,c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f;c.supports={simple:d("simple"),flag:d("flag")},c.supports.simple&&c.supports.flag||(f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings);
!function(a,b,c){function d(a){var c=b.createElement("canvas"),d=c.getContext&&c.getContext("2d");return d&&d.fillText?(d.textBaseline="top",d.font="600 32px Arial","flag"===a?(d.fillText(String.fromCharCode(55356,56812,55356,56807),0,0),c.toDataURL().length>3e3):(d.fillText(String.fromCharCode(55357,56835),0,0),0!==d.getImageData(16,16,1,1).data[0])):!1}function e(a){var c=b.createElement("script");c.src=a,c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g;c.supports={simple:d("simple"),flag:d("flag")},c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.simple&&c.supports.flag||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1)):(a.attachEvent("onload",g),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings);
</script>
<?php
}

View File

@@ -2072,7 +2072,7 @@ function wp_check_filetype( $filename, $mimes = null ) {
* If it's determined that the extension does not match the file's real type,
* then the "proper_filename" value will be set with a proper filename and extension.
*
* Currently this function only supports validating images known to getimagesize().
* Currently this function only supports renaming images validated via wp_get_image_mime().
*
* @since 3.0.0
*
@@ -2097,14 +2097,15 @@ function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) {
return compact( 'ext', 'type', 'proper_filename' );
}
// We're able to validate images using GD
if ( $type && 0 === strpos( $type, 'image/' ) && function_exists('getimagesize') ) {
// Validate image types.
if ( $type && 0 === strpos( $type, 'image/' ) ) {
// Attempt to figure out what type of image it actually is
$imgstats = @getimagesize( $file );
$real_mime = wp_get_image_mime( $file );
// If getimagesize() knows what kind of image it really is and if the real MIME doesn't match the claimed MIME
if ( !empty($imgstats['mime']) && $imgstats['mime'] != $type ) {
if ( ! $real_mime ) {
$type = $ext = false;
} elseif ( $real_mime != $type ) {
/**
* Filter the list mapping image mime types to their respective extensions.
*
@@ -2121,10 +2122,10 @@ function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) {
) );
// Replace whatever is after the last period in the filename with the correct extension
if ( ! empty( $mime_to_ext[ $imgstats['mime'] ] ) ) {
if ( ! empty( $mime_to_ext[ $real_mime ] ) ) {
$filename_parts = explode( '.', $filename );
array_pop( $filename_parts );
$filename_parts[] = $mime_to_ext[ $imgstats['mime'] ];
$filename_parts[] = $mime_to_ext[ $real_mime ];
$new_filename = implode( '.', $filename_parts );
if ( $new_filename != $filename ) {
@@ -2134,8 +2135,20 @@ function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) {
$wp_filetype = wp_check_filetype( $new_filename, $mimes );
$ext = $wp_filetype['ext'];
$type = $wp_filetype['type'];
} else {
$type = $ext = false;
}
}
} elseif ( function_exists( 'finfo_file' ) ) {
// Use finfo_file if available to validate non-image files.
$finfo = finfo_open( FILEINFO_MIME_TYPE );
$real_mime = finfo_file( $finfo, $file );
finfo_close( $finfo );
// If the extension does not match the file's real type, return false.
if ( $real_mime !== $type ) {
$type = $ext = false;
}
}
/**
@@ -2153,6 +2166,38 @@ function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) {
return apply_filters( 'wp_check_filetype_and_ext', compact( 'ext', 'type', 'proper_filename' ), $file, $filename, $mimes );
}
/**
* Returns the real mime type of an image file.
*
* This depends on exif_imagetype() or getimagesize() to determine real mime types.
*
* @since 4.7.1
*
* @param string $file Full path to the file.
* @return string|false The actual mime type or false if the type cannot be determined.
*/
function wp_get_image_mime( $file ) {
/*
* Use exif_imagetype() to check the mimetype if available or fall back to
* getimagesize() if exif isn't avaialbe. If either function throws an Exception
* we assume the file could not be validated.
*/
try {
if ( is_callable( 'exif_imagetype' ) ) {
$mime = image_type_to_mime_type( exif_imagetype( $file ) );
} elseif ( function_exists( 'getimagesize' ) ) {
$imagesize = getimagesize( $file );
$mime = ( isset( $imagesize['mime'] ) ) ? $imagesize['mime'] : false;
} else {
$mime = false;
}
} catch ( Exception $e ) {
$mime = false;
}
return $mime;
}
/**
* Retrieve list of mime types and file extensions.
*

View File

@@ -466,7 +466,7 @@ function wp_http_validate_url( $url ) {
if ( ! $same_host ) {
$host = trim( $parsed_url['host'], '.' );
if ( preg_match( '#^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$#', $host ) ) {
if ( preg_match( '#^(([1-9]?\d|1\d\d|25[0-5]|2[0-4]\d)\.){3}([1-9]?\d|1\d\d|25[0-5]|2[0-4]\d)$#', $host ) ) {
$ip = $host;
} else {
$ip = gethostbyname( $host );
@@ -475,7 +475,7 @@ function wp_http_validate_url( $url ) {
}
if ( $ip ) {
$parts = array_map( 'intval', explode( '.', $ip ) );
if ( 127 === $parts[0] || 10 === $parts[0]
if ( 127 === $parts[0] || 10 === $parts[0] || 0 === $parts[0]
|| ( 172 === $parts[0] && 16 <= $parts[1] && 31 >= $parts[1] )
|| ( 192 === $parts[0] && 168 === $parts[1] )
) {

File diff suppressed because one or more lines are too long

View File

@@ -93,8 +93,7 @@ window.wp = window.wp || {};
setMarkers: function( content ) {
var pieces = [ { content: content } ],
self = this,
instance,
current;
instance, current;
_.each( views, function( view, type ) {
current = pieces.slice();
@@ -102,7 +101,7 @@ window.wp = window.wp || {};
_.each( current, function( piece ) {
var remaining = piece.content,
result;
result, text;
// Ignore processed pieces, but retain their location.
if ( piece.processed ) {
@@ -119,10 +118,11 @@ window.wp = window.wp || {};
}
instance = self.createInstance( type, result.content, result.options );
text = instance.loader ? '.' : instance.text;
// Add the processed piece for the match.
pieces.push( {
content: '<p data-wpview-marker="' + instance.encodedText + '">' + instance.text + '</p>',
content: '<p data-wpview-marker="' + instance.encodedText + '">' + text + '</p>',
processed: true
} );
@@ -138,7 +138,8 @@ window.wp = window.wp || {};
} );
} );
return _.pluck( pieces, 'content' ).join( '' );
content = _.pluck( pieces, 'content' ).join( '' );
return content.replace( /<p>\s*<p data-wpview-marker=/g, '<p data-wpview-marker=' ).replace( /<\/p>\s*<\/p>/g, '</p>' );
},
/**
@@ -155,14 +156,15 @@ window.wp = window.wp || {};
encodedText,
instance;
text = tinymce.DOM.decode( text ),
encodedText = encodeURIComponent( text ),
instance = this.getInstance( encodedText );
text = tinymce.DOM.decode( text );
instance = this.getInstance( text );
if ( instance ) {
return instance;
}
encodedText = encodeURIComponent( text );
options = _.extend( options || {}, {
text: text,
encodedText: encodedText
@@ -416,7 +418,7 @@ window.wp = window.wp || {};
*/
replaceMarkers: function() {
this.getMarkers( function( editor, node ) {
if ( $( node ).text() !== this.text ) {
if ( ! this.loader && $( node ).text() !== this.text ) {
editor.dom.setAttrib( node, 'data-wpview-marker', null );
return;
}

File diff suppressed because one or more lines are too long

View File

@@ -704,7 +704,7 @@ VideoDetails = MediaDetails.extend({
if ( -1 === content.indexOf( attachment.get( 'url' ) ) ) {
content += [
'<track srclang="en" label="English"kind="subtitles" src="',
'<track srclang="en" label="English" kind="subtitles" src="',
attachment.get( 'url' ),
'" />'
].join('');

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -432,7 +432,7 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
editor.shortcuts.add( 'access+' + key, '', command );
} );
editor.addShortcut( 'ctrl+s', '', function() {
editor.addShortcut( 'meta+s', '', function() {
if ( typeof wp !== 'undefined' && wp.autosave ) {
wp.autosave.server.triggerSave();
}

File diff suppressed because one or more lines are too long

View File

@@ -152,19 +152,20 @@ tinymce.PluginManager.add( 'wpview', function( editor ) {
};
}
// Remove the content of view wrappers from HTML string
function emptyViews( content ) {
content = content.replace( /<div[^>]+data-wpview-text="([^"]+)"[^>]*>[\s\S]+?wpview-selection-after[^>]+>[^<>]*<\/p>\s*<\/div>/g, function( all, match ) {
return '<p>' + window.decodeURIComponent( match ) + '</p>';
});
function resetViewsCallback( match, viewText ) {
return '<p>' + window.decodeURIComponent( viewText ) + '</p>';
}
return content.replace( / data-wpview-marker="[^"]+"/g, '' );
// Replace the view tags with the view string
function resetViews( content ) {
return content.replace( /<div[^>]+data-wpview-text="([^"]+)"[^>]*>(?:[\s\S]+?wpview-selection-after[^>]+>[^<>]*<\/p>\s*|\.)<\/div>/g, resetViewsCallback )
.replace( /<p [^>]*?data-wpview-marker="([^"]+)"[^>]*>[\s\S]*?<\/p>/g, resetViewsCallback );
}
// Prevent adding undo levels on changes inside a view wrapper
editor.on( 'BeforeAddUndo', function( event ) {
if ( event.level.content ) {
event.level.content = emptyViews( event.level.content );
event.level.content = resetViews( event.level.content );
}
});
@@ -348,31 +349,29 @@ tinymce.PluginManager.add( 'wpview', function( editor ) {
}
});
function resetViews( rootNode ) {
// Replace view nodes
$( 'div[data-wpview-text]', rootNode ).each( function( i, node ) {
var $node = $( node ),
text = window.decodeURIComponent( $node.attr( 'data-wpview-text' ) || '' );
if ( text && node.parentNode ) {
$node.replaceWith( $( editor.dom.create('p') ).text( text ) );
}
// Empty the wpview wrap and marker nodes
function emptyViewNodes( rootNode ) {
$( 'div[data-wpview-text], p[data-wpview-marker]', rootNode ).each( function( i, node ) {
node.innerHTML = '.';
});
// Remove marker attributes
$( 'p[data-wpview-marker]', rootNode ).attr( 'data-wpview-marker', null );
}
// Run that before the DOM cleanup
editor.on( 'PreProcess', function( event ) {
// Replace the view nodes with their text in the DOM clone.
resetViews( event.node );
emptyViewNodes( event.node );
}, true );
editor.on( 'hide', function() {
// Replace the view nodes with their text directly in the editor body.
wp.mce.views.unbind();
deselect();
resetViews( editor.getBody() );
emptyViewNodes();
});
editor.on( 'PostProcess', function( event ) {
if ( event.content ) {
event.content = event.content.replace( /<div [^>]*?data-wpview-text="([^"]+)"[^>]*>[\s\S]*?<\/div>/g, resetViewsCallback )
.replace( /<p [^>]*?data-wpview-marker="([^"]+)"[^>]*>[\s\S]*?<\/p>/g, resetViewsCallback );
}
});
// Excludes arrow keys, delete, backspace, enter, space bar.

File diff suppressed because one or more lines are too long

View File

@@ -78,7 +78,7 @@ var tinyMCEPopup = {
* tinyMCEPopup.onInit.add(function(ed) {
* alert(ed.selection.getContent());
* });
*
*
* // Executes the init method on page load in some object using the SomeObject scope
* tinyMCEPopup.onInit.add(SomeObject.init, SomeObject);
*/
@@ -327,7 +327,7 @@ var tinyMCEPopup = {
}
},
// Internal functions
// Internal functions
_restoreSelection : function() {
var e = window.event.srcElement;
@@ -359,7 +359,7 @@ var tinyMCEPopup = {
"browse": "Browse"
};
var langCode = tinymce.settings.language || 'en';
var langCode = (tinymce.settings ? tinymce.settings : t.editor.settings).language || 'en';
for (var key in map) {
tinymce.i18n.data[langCode + "." + key] = tinymce.i18n.translate(map[key]);
}
@@ -523,7 +523,7 @@ tinymce.util.Dispatcher = function(scope) {
var self = this, returnValue, args = arguments, i, listeners = self.listeners, listener;
self.inDispatch = true;
// Needs to be a real loop since the listener count might change while looping
// And this is also more efficient
for (i = 0; i < listeners.length; i++) {

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,5 @@
( function( window, document, settings ) {
var src;
var src, ready;
/**
* Detect if the browser supports rendering emoji or flag emoji. Flag emoji are a single glyph
@@ -62,7 +62,28 @@
flag: browserSupportsEmoji( 'flag' )
};
settings.DOMReady = false;
settings.readyCallback = function() {
settings.DOMReady = true;
};
if ( ! settings.supports.simple || ! settings.supports.flag ) {
ready = function() {
settings.readyCallback();
};
if ( document.addEventListener ) {
document.addEventListener( 'DOMContentLoaded', ready, false );
window.addEventListener( 'load', ready, false );
} else {
window.attachEvent( 'onload', ready );
document.attachEvent( 'onreadystatechange', function() {
if ( 'complete' === document.readyState ) {
settings.readyCallback();
}
} );
}
src = settings.source || {};
if ( src.concatemoji ) {

View File

@@ -1 +1 @@
!function(a,b,c){function d(a){var c=b.createElement("canvas"),d=c.getContext&&c.getContext("2d");return d&&d.fillText?(d.textBaseline="top",d.font="600 32px Arial","flag"===a?(d.fillText(String.fromCharCode(55356,56812,55356,56807),0,0),c.toDataURL().length>3e3):(d.fillText(String.fromCharCode(55357,56835),0,0),0!==d.getImageData(16,16,1,1).data[0])):!1}function e(a){var c=b.createElement("script");c.src=a,c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f;c.supports={simple:d("simple"),flag:d("flag")},c.supports.simple&&c.supports.flag||(f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings);
!function(a,b,c){function d(a){var c=b.createElement("canvas"),d=c.getContext&&c.getContext("2d");return d&&d.fillText?(d.textBaseline="top",d.font="600 32px Arial","flag"===a?(d.fillText(String.fromCharCode(55356,56812,55356,56807),0,0),c.toDataURL().length>3e3):(d.fillText(String.fromCharCode(55357,56835),0,0),0!==d.getImageData(16,16,1,1).data[0])):!1}function e(a){var c=b.createElement("script");c.src=a,c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g;c.supports={simple:d("simple"),flag:d("flag")},c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.simple&&c.supports.flag||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1)):(a.attachEvent("onload",g),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings);

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More