Commit Graph

1327 Commits

Author SHA1 Message Date
John Blackbourn
de664966b0 Introduce is_https_url() for testing whether the scheme for a given URL is https. See #28487.
Built from https://develop.svn.wordpress.org/trunk@28894


git-svn-id: http://core.svn.wordpress.org/trunk@28693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-29 11:32:15 +00:00
Scott Taylor
0e3c4450cb wp_extract_urls() should not match dates.
Updates unit tests.

Props hinnerk, sergej.mueller.
Fixes #28222.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-28 04:16:14 +00:00
Scott Taylor
a21d9cdacf Do not touch absint(). Reverts [28855].
Built from https://develop.svn.wordpress.org/trunk@28858


git-svn-id: http://core.svn.wordpress.org/trunk@28661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-26 18:45:14 +00:00
Scott Taylor
ff8e9774ae Revert [28856] at nacin's behest. See #23383.
Built from https://develop.svn.wordpress.org/trunk@28857


git-svn-id: http://core.svn.wordpress.org/trunk@28660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-26 18:34:15 +00:00
Scott Taylor
cd93bc05e5 absint() should always return PHP_INT_MAX if the resulting value exceeds it.
See [28855].
Fixes #23383.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-26 18:24:15 +00:00
Scott Taylor
bae2b054ad Add a second optional parameter to absint() to limit the result to PHP_INT_MAX.
See #23383.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-26 17:52:15 +00:00
Scott Taylor
4bcf6b2d6a Add mime support for 3gp, 3g2 and 3gpp video formats. These are not supported by MediaElement or the WP media shortcodes, just an FYI.
Props azaozz, m_uysl.
Fixes #23380.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-26 01:43:15 +00:00
Sergey Biryukov
8b272f4379 Remove mbstring_binary_safe_strlen(). Use mbstring_binary_safe_encoding() and reset_mbstring_encoding() directly.
fixes #28162.
Built from https://develop.svn.wordpress.org/trunk@28808


git-svn-id: http://core.svn.wordpress.org/trunk@28617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-23 22:21:15 +00:00
Sergey Biryukov
9ceb642b2a Introduce a binary-safe wrapper for strlen() and use it in seems_utf8(), utf8_uri_encode(), and wp_read_image_metadata().
Use binary-safe POMO_Reader::strlen() in MO::export_to_file_handle().

fixes #28162.
Built from https://develop.svn.wordpress.org/trunk@28806


git-svn-id: http://core.svn.wordpress.org/trunk@28615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-23 14:48:14 +00:00
Andrew Nacin
bbff31baca Stop denying wp-includes/* in our default robots.txt.
props joostdevalk.
fixes #28604.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-20 21:02:14 +00:00
Scott Taylor
6cb51c9ceb smilies_init(), treat   like whitespace when converting smilies.
Adds unit tests.

Props miqrogroove.
Fixes #27587.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-10 02:03:14 +00:00
Scott Taylor
05eeb16e30 Replace all uses of like_escape() with $wpdb->esc_like().
Props miqrogroove.
See #10041.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-10 00:44:15 +00:00
John Blackbourn
d00b196084 Deprecate url_is_accessable_via_ssl(). Fixes #19555. Props jgadbois.
Built from https://develop.svn.wordpress.org/trunk@28709


git-svn-id: http://core.svn.wordpress.org/trunk@28525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-09 22:03:18 +00:00
Sergey Biryukov
fd99912f65 Fix typo in mbstring_binary_safe_encoding() description.
props ghost1227.
fixes #28423.
Built from https://develop.svn.wordpress.org/trunk@28648


git-svn-id: http://core.svn.wordpress.org/trunk@28466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-01 05:06:15 +00:00
Scott Taylor
061b5d398b Move default to the bottom in _wp_mysql_week().
See #28409.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-30 18:10:15 +00:00
Scott Taylor
af860fbe84 Cleanup for switch statements:
* Move `default` to the bottom in `WP_Theme_Install_List_Table`
* `switch/endswitch` syntax is not supported in Hack. Switch to `switch (...) {  .... }` syntax. (A few template-type instances linger).

Fixes #28409.
See #27881.


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


git-svn-id: http://core.svn.wordpress.org/trunk@28452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-30 17:58:15 +00:00
Andrew Nacin
d29dc48134 Forcing SSL logins now forces SSL for the entire admin, with no middle ground.
fixes #10267.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-29 03:59:15 +00:00
Sergey Biryukov
aab2e48fa0 Update documentation for is_new_day().
props obenland.
fixes #28333.
Built from https://develop.svn.wordpress.org/trunk@28588


git-svn-id: http://core.svn.wordpress.org/trunk@28413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-27 11:41:14 +00:00
Scott Taylor
e4bc49c244 Because PHP can be configured without --filter, it is not 100% safe to use filter_var(). This is problematic for casting "false" to false, as PHP always casts it to true. FILTER_VALIDATE_BOOLEAN fixes this, but it may not be available.
Add a new function, `wp_validate_boolean()`, to replace `filter_var( $var, FILTER_VALIDATE_BOOLEAN )`.

Fixes #28170.


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


git-svn-id: http://core.svn.wordpress.org/trunk@28368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-22 18:34:15 +00:00
Scott Taylor
bbcc03a750 Eliminate the use of extract() in wp_check_filetype_and_ext().
See #22400.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-15 06:22:14 +00:00
Scott Taylor
f32dbfe62c Add xps and oxps extensions to list of supported document types.
More: http://en.wikipedia.org/wiki/Open_XML_Paper_Specification

Fixes #15697.


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


git-svn-id: http://core.svn.wordpress.org/trunk@28200 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-11 07:19:13 +00:00
Scott Taylor
de4eaacd89 In wp-includes/functions.php, remove dead code:
* In `current_time()`, `break` is unreachable after `return`.
* In `add_query_arg()`, `$ret` is set twice before being used.
* In `wp_mkdir_p()`, `$dir_perms` is set twice before being used.

See #27882.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28153 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-06 21:23:14 +00:00
Scott Taylor
b663fffe24 Add .dfxp and .srt files to mime-type whitelist in wp_get_mime_types(). They are both captioning formats supported by MediaElement.
Props joedolson.
Fixes #27643.


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


git-svn-id: http://core.svn.wordpress.org/trunk@28087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-05 20:08:16 +00:00
Sergey Biryukov
58dcece494 Correct @return value for current_time().
props arnee.
fixes #27940.
Built from https://develop.svn.wordpress.org/trunk@28240


git-svn-id: http://core.svn.wordpress.org/trunk@28068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-02 11:25:15 +00:00
Drew Jaynes
ca7ef18e55 Inline documentation for hooks in wp-includes/functions.php.
Props jesin, GaryJ.
Fixes #27715.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-14 00:20:14 +00:00
Andrew Ozz
dc52e17417 RTL for TinyMCE:
- Add _dir: 'rtl' to the TinyMCE translation object.
- Fix editor.css for RTL.
- Fix the Edit and Delete buttons position for wpview and images.
- For _mce_set_direction(), update documentation and fix adding the 'ltr' button.
Fixes #27773
Built from https://develop.svn.wordpress.org/trunk@28094


git-svn-id: http://core.svn.wordpress.org/trunk@27925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-13 00:23:15 +00:00
Dominik Schilling
2f0c68ad0e Adjust colors in wp_die() and install.css.
Missed in [26788] and [26837], see #25858.
fixes #27589.
Built from https://develop.svn.wordpress.org/trunk@27855


git-svn-id: http://core.svn.wordpress.org/trunk@27686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-29 23:06:14 +00:00
Andrew Nacin
bba24b09ca In is_serialized(), use substr() rather than array access, for compatibility with multibyte overloading.
props SergeyBiryukov.
fixes #18007.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-17 20:09:17 +00:00
Scott Taylor
f078f3e10e Video editing in the media modal:
* Add a state: `Add Subititles`
* Add `text/vtt` to the list of allowed mime-types, files end in `.vtt`. `.srt` files are served as `text/plain`.
* The content body of a video shortcode should be used for adding `<track>` elements only. This happens dynamically in the modal. If added by hand, they can still be parsed and managed.

See #27016.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-09 10:32:15 +00:00
John Blackbourn
adc2a2c872 Update the list of HTTP status code descriptions. Fixes #16914. Props sirzooro and hakre for the original patches.
Built from https://develop.svn.wordpress.org/trunk@27422


git-svn-id: http://core.svn.wordpress.org/trunk@27269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-05 22:01:16 +00:00
Andrew Nacin
580b05ae5d Strip backslashes, not just forward slashes, from untrailingslashit().
trailingslashit() will now remove any forward or backslashes from the end of a string before appending a forward slash.

props knutsp, willmot.
fixes #22267.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27196 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-01 21:45:15 +00:00
Andrew Nacin
ffb64a7503 Keep redirect_to when hitting the log out AYS.
props mitchoyoshitaka for initial patch.
fixes #17398.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-25 20:02:14 +00:00
Drew Jaynes
cb8951b0b3 Remove all @package and @subpackage PHPDoc tags not at the file- or class-levels in core.
See #27200.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-25 17:14:14 +00:00
Andrew Nacin
237941babc Allow current_time() to accept a date format string, adding to 'timestamp' and 'mysql'.
props danielbachhuber.
fixes #21653.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-25 17:01:13 +00:00
Andrew Nacin
5f0981788d Detect and handle symlinking of plugins in plugin_basename().
props rmccue, MikeSchinkel, jdgrimes.
see #16953.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-10 23:00:15 +00:00
Andrew Ozz
eba12cfaf4 Remove unused arg from wp_auth_check(), see #27081.
Built from https://develop.svn.wordpress.org/trunk@27154


git-svn-id: http://core.svn.wordpress.org/trunk@27021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-09 22:34:11 +00:00
Dominik Schilling
a4e5457ee1 Update @return statement of wp_nonce_url(): The URL is escaped.
props c3mdigital.
see #4221.
Built from https://develop.svn.wordpress.org/trunk@27070


git-svn-id: http://core.svn.wordpress.org/trunk@26943 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-02 10:53:11 +00:00
Scott Taylor
678ef2b1e1 In wpdb::db_connect(), allow the loading of a custom database error template - this is already allowed in dead_db().
In `dead_db()`, move the call to `wp_load_translations_early()` before the inclusion of the `db-error.php` file to allow translation in both locations before the template is loaded.

Props sbruner, kovshenin.
Fixes #25703.


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


git-svn-id: http://core.svn.wordpress.org/trunk@26929 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-29 05:28:12 +00:00
Dion Hulse
2d9dd4979e Uploads: Fix the Order of Operations for wp_mkdir_p() which caused this branch to never be hit. Props fboender. Fixes #26781 for trunk. See #25822
Built from https://develop.svn.wordpress.org/trunk@26926


git-svn-id: http://core.svn.wordpress.org/trunk@26807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-08 23:13:10 +00:00
Ryan Boren
07c16fd23c The Pinking Shears stir from their slumber, awakened by what may seem, to those
innocent in the ways of The Shears, a triviality, a nothing-of-consequence. But there are consequences indeed for recklessly trailing your whitespace. Naturally, they a dire!

One, two! One, two! And through and through
The Pinking Shears went snicker-snack!
They plucked your tail and with your space
They went sniksnuking back.

Let me tell you, that can be uncomfortable, so always pre-sniksnuk your trailing whites. May The Shears be with you.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-11 19:49:11 +00:00
Dion Hulse
7f1047ece1 Remove the experimental RSS.JS feed, and move it to a plugin for feature development. Unprops pento. See #25639
Built from https://develop.svn.wordpress.org/trunk@26644


git-svn-id: http://core.svn.wordpress.org/trunk@26534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-04 22:24:10 +00:00
Dion Hulse
8c60f742a1 Fix a regression in wp_mkdir_p() where the $mode of the parent folder is not correctly applied to all created paths. Fixes #25822 for trunk
Built from https://develop.svn.wordpress.org/trunk@26449


git-svn-id: http://core.svn.wordpress.org/trunk@26347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-28 02:20:10 +00:00
Matt Thomas
c0f4798af9 Update error screens with the new visual design:
* Bring in new styles for backgrounds/text/link/borders/buttons
* Switch to device-width for the viewport and tweak margins etc so the layout works nicely on all device sizes

Fixes #25956, props johnbillion.


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


git-svn-id: http://core.svn.wordpress.org/trunk@26204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-21 00:25:10 +00:00
Andrew Nacin
c8bbc31c39 Add an experimental rssjs feed based on the experimental rss.js spec.
This is simply a JSON representation of the RSS 2.0 feed, accessible at /feed/rssjs/ anywhere.

props pento.
see #25639.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-20 22:58:09 +00:00
Sergey Biryukov
c7a96bbf29 Use get_current_site() instead of the $current_site global in wp-admin/admin-header.php and is_main_network().
fixes #25158.
Built from https://develop.svn.wordpress.org/trunk@26235


git-svn-id: http://core.svn.wordpress.org/trunk@26142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-16 13:46:10 +00:00
Scott Taylor
c2bc0e6836 Don't place smilies inside of pre or code tags. Don't skip smilie after a smilie with an 8 in it. Fix regular expression used for smiley translations to work when there is only one registered emoticon.
Props solarissmoke, soulseekah, mdbitz, yonasy. ht to mdbitz for the Unit Tests and a comprehensive patch.
Fixes #16448, #20124, #25303.


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


git-svn-id: http://core.svn.wordpress.org/trunk@26099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-15 02:46:10 +00:00
Dion Hulse
560b0c8b0a Fix a case where wp_guess_url() would leave a prefixed path in the generated URL when symlinks were involved. Fixes #25797
Built from https://develop.svn.wordpress.org/trunk@26031


git-svn-id: http://core.svn.wordpress.org/trunk@25961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-07 03:34:10 +00:00
Sergey Biryukov
918e8bab96 Remove irrelevant @see references. props mt8.biz. fixes #25843.
Built from https://develop.svn.wordpress.org/trunk@26022


git-svn-id: http://core.svn.wordpress.org/trunk@25953 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-06 10:17:09 +00:00
Andrew Nacin
d0cfa40983 Add jshintrc to qunit.
props jorbin.
see #25187.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-30 14:39:10 +00:00
Andrew Nacin
deadb7b296 Avoid a notice in is_main_network() when called in single site. see #25030.
Built from https://develop.svn.wordpress.org/trunk@25827


git-svn-id: http://core.svn.wordpress.org/trunk@25827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:53:31 +00:00
Andrew Nacin
8ae8e01b67 Remove the old wp_auto_updates_maybe_update cron event. Schedule the new wp_maybe_auto_update event at 7 a.m. and 7 p.m. in the site's timezone.
see #27704.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:53:14 +00:00
Andrew Nacin
8f0f48e3f9 Avoid a notice in is_main_network() when called in single site. see #25030.
Built from https://develop.svn.wordpress.org/trunk@25827


git-svn-id: http://core.svn.wordpress.org/trunk@25739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-17 05:17:08 +00:00
Sergey Biryukov
336c737727 Correct phpdoc for wp_check_filetype_and_ext(). props dimadin. fixes #25513.
Built from https://develop.svn.wordpress.org/trunk@25713


git-svn-id: http://core.svn.wordpress.org/trunk@25626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-07 15:34:10 +00:00
Andrew Nacin
d7fc6d5d49 Order search results by relevance, rather than by date.
The ordering logic is as follows:
 * Full sentence matches in post titles.
 * All search terms in post titles.
 * Any search terms in post titles.
 * Full sentence matches in post content.

Each section and any remaining posts are then sorted by date.

Introduces some filters:
 * wp_search_stopwords, to filter stop words ignored in WHERE.
 * posts_search_orderby, to filter the ORDER BY when ordering search results.

props azaozz, wonderboymusic.
fixes #7394.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-27 17:34:09 +00:00
Dominik Schilling
32aff2db8a Add 'image' type/extensions to wp_ext2type() and make it case insensitive. props xparham. fixes #25176.
Built from https://develop.svn.wordpress.org/trunk@25437


git-svn-id: http://core.svn.wordpress.org/trunk@25359 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-14 14:34:09 +00:00
Dion Hulse
bbd3312389 Account for Windows and CLI instances in wp_guess_url(). Props SergeyBiryukov. See #25317
Built from https://develop.svn.wordpress.org/trunk@25436


git-svn-id: http://core.svn.wordpress.org/trunk@25358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-14 03:43:10 +00:00
Andrew Nacin
4542e678d2 Return false from wp_get_original_referer() if it is called before wp_validate_redirect() is defined.
see #25294.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25331 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-12 13:36:09 +00:00
Andrew Nacin
46611d4282 Return false from wp_get_referer() if it is called before wp_validate_redirect() is defined.
see #25294.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25330 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-12 13:33:09 +00:00
Dion Hulse
641d3b2560 Fix wp_guess_url() to work in every scenario I could find, allows us to use it to determine the correct path to the WordPress Site URL before installation for install.php and setup-config.php redirects. Fixes #24480 Fixes #16884
Built from https://develop.svn.wordpress.org/trunk@25396


git-svn-id: http://core.svn.wordpress.org/trunk@25327 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-12 06:57:09 +00:00
Helen Hou-Sandí
8359c66176 Indicate that the fall-through in is_serialized() is deliberate. fixes #24023.
Built from https://develop.svn.wordpress.org/trunk@25371


git-svn-id: http://core.svn.wordpress.org/trunk@25321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-12 03:41:09 +00:00
Dion Hulse
ca008522f3 Add a set of helpers to turn the behaviour of mbstring.func_overload off when needed. Fixes #25259
Built from https://develop.svn.wordpress.org/trunk@25346


git-svn-id: http://core.svn.wordpress.org/trunk@25308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-11 07:23:08 +00:00
Andrew Nacin
1536779aaf Avoid error in ms-files.php after [25317].
Built from https://develop.svn.wordpress.org/trunk@25344


git-svn-id: http://core.svn.wordpress.org/trunk@25306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-11 04:49:10 +00:00
Andrew Nacin
89c57124da Improve clarity and speed of [25320].
Built from https://develop.svn.wordpress.org/trunk@25338


git-svn-id: http://core.svn.wordpress.org/trunk@25300 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-11 03:23:08 +00:00
Scott Taylor
02757de9d8 Remove dead code in add_query_arg().
Props hakre, c3mdigital.
Fixes #16942.


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


git-svn-id: http://core.svn.wordpress.org/trunk@25295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-10 23:38:09 +00:00
Andrew Nacin
a461a25d76 Loose validation for is_serialized() in maybe_serialize().
Built from https://develop.svn.wordpress.org/trunk@25320


git-svn-id: http://core.svn.wordpress.org/trunk@25282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-10 18:10:09 +00:00
Andrew Nacin
cf3fddde96 Validate referrers to prevent off-domain redirects.
Built from https://develop.svn.wordpress.org/trunk@25318


git-svn-id: http://core.svn.wordpress.org/trunk@25280 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-10 18:07:10 +00:00
Andrew Nacin
c8a7b53c65 Tighten allowed upload file types.
Built from https://develop.svn.wordpress.org/trunk@25317


git-svn-id: http://core.svn.wordpress.org/trunk@25279 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-10 18:04:09 +00:00
Scott Taylor
a563a5b2fa Replace the ancient phpfreaks.com RegEx to extract urls to ping with a more robust matcher. URLs with commas and things like &amp; were not being pinged. The new matcher even works for most IDN URLs. Adds unit tests.
Fixes #9064.


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


git-svn-id: http://core.svn.wordpress.org/trunk@25275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-10 03:18:08 +00:00
Andrew Nacin
6a1ac52330 Be less verbose when erroring out in do_feed() for an invalid feed template. fixes #24874.
Built from https://develop.svn.wordpress.org/trunk@25190


git-svn-id: http://core.svn.wordpress.org/trunk@25162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-30 23:37:11 +00:00
Andrew Nacin
1fbc03a388 The main site of a secondary network should not use the original wp-content/uploads upload path.
props jeremyfelt.
fixes #25030.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-28 03:36:09 +00:00
Andrew Nacin
4d6d80a14f Introduce is_main_network().
By default, a network ID of 1 is assumed to be the main network.
Otherwise, it is the first network listed in the wp_site table.

If PRIMARY_NETWORK_ID is defined, it is considered main network.

props jeremyfelt.
see #25030.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-28 03:35:08 +00:00
Sergey Biryukov
c7de681a26 Add description for _wp_timezone_choice_usort_callback(). props neoxx. fixes #25125.
Built from https://develop.svn.wordpress.org/trunk@25101


git-svn-id: http://core.svn.wordpress.org/trunk@25083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-23 13:57:08 +00:00
Dion Hulse
5eb1c81924 Make use of the recursive option in mkdir() in wp_mkdir_p(). Avoids a bunch of silenced PHP Notices being logged. Fixes #23196
Built from https://develop.svn.wordpress.org/trunk@25047


git-svn-id: http://core.svn.wordpress.org/trunk@25034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-17 03:09:11 +00:00
Andrew Nacin
1065f55586 Add a function to return an empty string, for filters. props wpsmith, trepmal. fixes #20357.
Built from https://develop.svn.wordpress.org/trunk@25037


git-svn-id: http://core.svn.wordpress.org/trunk@25024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-16 20:02:08 +00:00
Ryan Boren
acc0aec2b0 Silence is_dir() to avoud warning when upload_tmp_dir is outside open_basedir.
Props dpash
fixes #24704


git-svn-id: http://core.svn.wordpress.org/trunk@24995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-06 17:39:33 +00:00
Andrew Nacin
21a1fe8d4b Use wp_safe_remote_request() and friends instead of reject_unsafe_urls = true.
fixes #24646.



git-svn-id: http://core.svn.wordpress.org/trunk@24917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-31 06:52:13 +00:00
Michael Adams
ec6f40342a Allow HTTPS URL enclosures.
Props markjaquith with a patch that predates all WordCamps.

Fixes #2875.


git-svn-id: http://core.svn.wordpress.org/trunk@24810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-28 19:07:43 +00:00
Andrew Nacin
a70604d441 Add iWork formats to valid upload filetypes. key, numbers, pages. props barry, fixes #24621.
git-svn-id: http://core.svn.wordpress.org/trunk@24782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-23 15:29:26 +00:00
Ryan Boren
cbf77c6523 Fire wp_auth_check_load() from admin_enqueue_scripts instead of admin_init so that it can access the current screen object.
Black list the update and upgrade screens.

Allow plugins to white/black list screens via the wp_auth_check_load filter.

Props nacin

see #23295


git-svn-id: http://core.svn.wordpress.org/trunk@24738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-18 19:06:35 +00:00
Peter Westwood
b58e828475 Fall back to non-translated strings in _deprecated_*() if the translation function doesn't exist. This may be the case in sunrise, for example.
Fixes #24778 props SergeyBiryukov.


git-svn-id: http://core.svn.wordpress.org/trunk@24723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-17 21:04:50 +00:00
Andrew Ozz
b96efc779a Logged out warnings:
- Replace the Close button with an always visible "X" icon in the top/right corner.
- Check if the user is still logged in every 3 min. by default.
- Add 'wp_auth_check_interval' filter so the interval can be set from PHP.
See #23295.

git-svn-id: http://core.svn.wordpress.org/trunk@24695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-12 23:32:32 +00:00
Andrew Nacin
740d141e1d Support IIS 8 and above.
props hurtige for initial patch.
fixes #23533.



git-svn-id: http://core.svn.wordpress.org/trunk@24594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-08 20:27:06 +00:00
Ryan Boren
419fea1a16 Normalize the UTF-8 and ISO-8859-1 charset strings stored in blog_charset to make them friendlier with PHP functions that accept a charset such as htmlspecialchars().
fixes #23688


git-svn-id: http://core.svn.wordpress.org/trunk@24510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-06-25 19:03:17 +00:00
Andrew Nacin
96ee267343 Better validation of the URL used in core HTTP requests.
git-svn-id: http://core.svn.wordpress.org/trunk@24480 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-06-21 06:07:47 +00:00
Andrew Nacin
7addff9967 Use correct variable order in add_query_arg(). This had mostly just filled error logs; it also broke some obscure URL situations. see #23284.
git-svn-id: http://core.svn.wordpress.org/trunk@24444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-06-19 08:33:10 +00:00
Andrew Nacin
bb1234c4be Fall back to non-translated strings in _doing_it_wrong() if the translation function doesn't exist. This may be the case in sunrise, for example.
props SergeyBiryukov.
fixes #23555.
for trunk.



git-svn-id: http://core.svn.wordpress.org/trunk@24439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-06-19 08:11:59 +00:00
Andrew Ozz
b1009b33c4 Logged out warnings: fix same domain comparison in wp_auth_check_html() when FORCE_SSL_LOGIN && ! FORCE_SSL_ADMIN. See #23295
git-svn-id: http://core.svn.wordpress.org/trunk@24266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-15 22:09:54 +00:00
Sergey Biryukov
74638ccb5a Fix typos in phpdoc. props TheLastCicada. fixes #24302.
git-svn-id: http://core.svn.wordpress.org/trunk@24229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-10 01:39:30 +00:00
Andrew Ozz
19c3b4bfdc Logged out warnings:
- Don't use <base> tag to set target="_blank". It can break form submission. Instead, set target only on links with JS.
- Fix same domain comparison in wp_auth_check_html() when FORCE_SSL_LOGIN == true.
- Properly show/hide the "Close" button when the dialog is shown multiple times.
See #23295

git-svn-id: http://core.svn.wordpress.org/trunk@24208 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-08 22:45:58 +00:00
Mark Jaquith
0a49442e35 Multiple improvements to image post format insertion and display.
* get_tag_regex() altered based on Unit Tests.
* Changes to post-formats.js to provide size and link context during image selection.
* Captions are now output in the_post_format_image() when present.
* The meta value for url is respected for the image post format when the HTML in the image meta doesn't include a link

props wonderboymusic. fixes #23965, #23964. see #24147, #24046.

git-svn-id: http://core.svn.wordpress.org/trunk@24066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-22 22:11:42 +00:00
Andrew Ozz
bcb9eef7cd Logged out warnings: fix phpdoc, props ocean90, see #23295
git-svn-id: http://core.svn.wordpress.org/trunk@23922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-05 23:28:40 +00:00
Andrew Ozz
04c5aefbea Logged out warnings: add fallback text dialog for:
- The login page has "X-Frame-Options: DENY" header.
- Cross-domain when displaying on the front-end on multisite with domain mapping.
- The site forces ssl login but not ssl admin.

Add onbeforeunload prompt to counter (frame-busting) JS redirects. Move the JS and CSS into separate files. See #23295.

git-svn-id: http://core.svn.wordpress.org/trunk@23805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-27 08:43:11 +00:00
Ryan Boren
9f44cb4038 Remove old phpdoc that incorrectly marks wp_timezone_choice() as temporary.
Props danielbachhuber
fixes #23804


git-svn-id: http://core.svn.wordpress.org/trunk@23738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-18 13:35:34 +00:00
Mark Jaquith
53d12e91bc Introduce [audio] and [video] shortcodes, and use MediaElement.js to play them.
props wonderboymusic. see #23282.

git-svn-id: http://core.svn.wordpress.org/trunk@23729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-16 05:25:44 +00:00
Andrew Nacin
af53edb696 Revert [23411] until encoding differences are worked out. see #20771.
git-svn-id: http://core.svn.wordpress.org/trunk@23637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-07 06:57:56 +00:00
Andrew Nacin
7b47322e22 Ensure the referer functions operate completely on unslashed data: wp_referer_field(), wp_original_referer_field(), wp_get_referer(), wp_get_original_referer().
Use wp_slash() instead of addslashes().

see #21767.



git-svn-id: http://core.svn.wordpress.org/trunk@23578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 17:58:43 +00:00
Ryan Boren
09d2c65970 Always wp_unslash() the return of wp_get_referer().
see #21767


git-svn-id: http://core.svn.wordpress.org/trunk@23570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 17:20:32 +00:00
Ryan Boren
43a7e695e9 Revert 23416, 23419, 23445 except for wp_reset_vars() changes. We are going a different direction with the slashing cleanup, so resetting to a clean slate. see #21767
git-svn-id: http://core.svn.wordpress.org/trunk@23554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 16:28:40 +00:00
Andrew Ozz
99e168d1a2 Logged out warnings: restructure the PHP code (no need for a class), props nacin, see #23295
git-svn-id: http://core.svn.wordpress.org/trunk@23543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 01:55:33 +00:00
Andrew Nacin
81080da6f2 Allow nonce name to be passed to wp_nonce_url(), as allowed by wp_nonce_field(). props MatthewRuddy, fixes #22423.
git-svn-id: http://core.svn.wordpress.org/trunk@23519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-28 18:08:53 +00:00