Commit Graph

3622 Commits

Author SHA1 Message Date
Gary Pendergast
ba24459a63 The UTF-8 regex can occasionally fail on very low memory machines. Reduce the amount of memory it uses.
See #32204.



git-svn-id: https://develop.svn.wordpress.org/trunk@32375 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-06 06:57:44 +00:00
Gary Pendergast
ed53ad2c53 WPDB: When sanity checking query character sets, there's no need to check queries that don't return user data.
See #32104.



git-svn-id: https://develop.svn.wordpress.org/trunk@32374 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-06 06:04:50 +00:00
Gary Pendergast
923c6c981b WPDB: Allow queries to reference tables in the dbname.tablename format, and allow table names to contain any valid character, rather than just ASCII.
Props pento, willstedt for the initial patch.

See #32090.



git-svn-id: https://develop.svn.wordpress.org/trunk@32368 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-06 05:00:39 +00:00
Andrew Ozz
8737968ac2 TinyMCE: update to 4.1.10.
Fixes #32262.

git-svn-id: https://develop.svn.wordpress.org/trunk@32366 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-06 03:22:04 +00:00
Gary Pendergast
2ce97b2984 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.
Props mdawaffe, pento, nbachiyski, jorbin, johnjamesjacoby, jeremyfelt.

See #32165.



git-svn-id: https://develop.svn.wordpress.org/trunk@32364 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-06 02:59:50 +00:00
Boone Gorges
35db6d722b In paginate_links(), improve handling of custom pagination query vars.
Custom pagination query vars, as provided in the 'base' parameter, must be
detected in the current page URL and removed before generating fresh pagination
links. The logic introduced in this changeset ensures that these custom
query vars are properly detected in cases where the 'format' param contains
a `#`.

This is a follow-up to [31203] #30831.

Fixes #31939.

git-svn-id: https://develop.svn.wordpress.org/trunk@32359 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-05 21:58:23 +00:00
Boone Gorges
bb29a878c6 Improve performance of get_page_children().
The new algorithm uses a hash table rather than function recursion, reducing
complexity to O(N). On large numbers of pages, the performance improvement is
several orders of magnitude.

Props santagada, hailin, mihai.
Fixes #10852.

git-svn-id: https://develop.svn.wordpress.org/trunk@32355 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-05 19:36:58 +00:00
Boone Gorges
1efe303ebf Improve sanitization of 'name' param in get_terms().
Values of 'name' that contain db-encoded character on insert - like an
ampersand, which is HTML-encoded in the database - will only match if they go
through the same `sanitize_term_field()` routine.

Fixes #32248.

git-svn-id: https://develop.svn.wordpress.org/trunk@32353 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-05 11:13:51 +00:00
Drew Jaynes
9d9fbf6a5b Add a changelog entry for the $resource_type parameter added to the get_ancestors filter in 4.1.1.
Props dimadin.
See #31925.


git-svn-id: https://develop.svn.wordpress.org/trunk@32351 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-05 02:16:58 +00:00
Drew Jaynes
7138b7e1bd Add two changelog entries for functional changes introduced in 4.2.0.
Props dimadin.
See #31925.


git-svn-id: https://develop.svn.wordpress.org/trunk@32350 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-05 02:15:27 +00:00
Drew Jaynes
fae4ff9b2f Ensure the optional parameters for get_taxonomies() are documented as such.
See #31800.


git-svn-id: https://develop.svn.wordpress.org/trunk@32349 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-05 02:04:52 +00:00
Drew Jaynes
e8668f7bca Improve inline documentation in wp-includes/taxonomy.php.
* Adds missing `@since` versions
* Adds `@global` tags and descriptions to DocBlocks where appropriate

Props ChaseWiseman.
See #31800.


git-svn-id: https://develop.svn.wordpress.org/trunk@32348 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-05 02:00:18 +00:00
Andrew Ozz
717ea3f7cd Emoji: add shorter/faster regex for testing for emoji chars in added nodes.
See #32125.

git-svn-id: https://develop.svn.wordpress.org/trunk@32347 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-05 01:40:21 +00:00
Boone Gorges
a4625b51eb Add 'webcal' to the list of URI protocols whitelisted by default.
Fixes #31666.

git-svn-id: https://develop.svn.wordpress.org/trunk@32346 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-05 00:37:14 +00:00
Drew Jaynes
fbb60698ea Add a missing @return tag and description to the DocBlock for WP_Theme::scandir().
Props lamosty.
Fixes #31872.


git-svn-id: https://develop.svn.wordpress.org/trunk@32345 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-05 00:33:55 +00:00
Drew Jaynes
98bed37af3 Properly document WP_Theme::scandir() as a static method, adjust parameter documentation for formatting and clarity.
See #31872.


git-svn-id: https://develop.svn.wordpress.org/trunk@32344 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-05 00:32:23 +00:00
Boone Gorges
93a4bf15e4 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 trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@32342 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-04 13:09:14 +00:00
Andrew Ozz
49626f348a Emoji: rename the exclude class to wp-exclude-emoji.
Props Clorith. See #32197.

git-svn-id: https://develop.svn.wordpress.org/trunk@32337 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-04 00:04:15 +00:00
Andrew Ozz
992cc2e796 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.
See #32197.

git-svn-id: https://develop.svn.wordpress.org/trunk@32336 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-03 20:17:38 +00:00
Andrew Ozz
6368ee0c6a Emoji: before parsing added nodes test if the text in them contains emoji chars. That speeds up the processing quite a bit.
See #32125.

git-svn-id: https://develop.svn.wordpress.org/trunk@32335 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-03 19:07:31 +00:00
Andrew Ozz
9c3c452fa9 Emoji:
- Fix loading errors in IE9 and IE10.
- Add fallbacks for the loading events.
Fixes #32109 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@32334 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-03 18:44:37 +00:00
Sergey Biryukov
2848b8a911 Replace echo __() with _e().
props marsjaninzmarsa.
fixes #32239.

git-svn-id: https://develop.svn.wordpress.org/trunk@32333 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-03 16:17:06 +00:00
Boone Gorges
e5e467a41b Allow metadata to be deleted when meta_value matches 0 or '0'.
In `delete_metadata()`, be stricter about when to ignore a falsey value of
`$meta_value`.

For backward compatibility, an empty string for `$meta_value` is equivalent to
`null` or `false`.

Props sc0ttkclark.
Fixes #32224.

git-svn-id: https://develop.svn.wordpress.org/trunk@32331 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-01 16:37:35 +00:00
Scott Taylor
625e7135f3 After [32258], restore the parts of [31620] and [31626] that weren't changes to the UI, but were improvements to existing code.
* Use `wp.shortcode()` instead of manually constructing a shortcode in `views/embed/link`
* In `WP_Embed`, store the last URL and last set of attributes requested in class properties
* `wp_ajax_parse_embed()`, allow `[embed]`s to have attributes. Return `attr` in the response.

See #31139.


git-svn-id: https://develop.svn.wordpress.org/trunk@32330 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-30 21:39:52 +00:00
Boone Gorges
53d42e6a9c Remove duplicate semicolon introduced in [32326].
git-svn-id: https://develop.svn.wordpress.org/trunk@32327 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-29 12:57:35 +00:00
Boone Gorges
1700d2b265 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 trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@32326 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-29 12:55:29 +00:00
Sergey Biryukov
51b69b1f7f Fix typo in a comment in wp_guess_url().
props ixkaito.
fixes #32179.

git-svn-id: https://develop.svn.wordpress.org/trunk@32325 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-29 07:18:35 +00:00
Andrew Ozz
f31aeb97f1 Emoji: fix loop when replacement images fail to load.
Props iseulde. Fixes #32128 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@32323 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-29 03:19:01 +00:00
Gary Pendergast
0224286861 When upgrading to 4.2.1, delete suspicious comments.
git-svn-id: https://develop.svn.wordpress.org/trunk@32308 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-27 16:03:48 +00:00
Gary Pendergast
0152b8f49b In [32299], we should be using mb_strlen() for our string size checks.
git-svn-id: https://develop.svn.wordpress.org/trunk@32306 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-27 14:41:48 +00:00
Gary Pendergast
45b0abbef1 WPDB: Sanity check that any strings being stored in the DB are not too long to store correctly.
git-svn-id: https://develop.svn.wordpress.org/trunk@32299 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-27 14:02:45 +00:00
Andrew Nacin
ca8d6fb60f Escape the $s global.
fixes #32142.


git-svn-id: https://develop.svn.wordpress.org/trunk@32298 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-27 05:09:24 +00:00
Sergey Biryukov
fdd254b5d8 Add missing word to wp_insert_term() error strings.
props dipesh.kakadiya.
fixes #32031.

git-svn-id: https://develop.svn.wordpress.org/trunk@32297 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-26 11:49:36 +00:00
Sergey Biryukov
04ef03636e Check if SCRIPT_DEBUG is defined before using it in print_emoji_detection_script().
props Craig Ralston.
fixes #32118 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@32296 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-26 10:35:53 +00:00
Andrew Nacin
29718f1c28 Fix keyboard shortcut for save from the visual editor.
props iseulde.
see #32122, for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@32295 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-26 04:50:41 +00:00
Boone Gorges
c3ea088948 When priming the cache for taxonomy term nav items, don't fetch term descendants.
Descending the term tree causes unnecessary database queries when priming the
cache for a term with many descendants.

Fixes #31724.

git-svn-id: https://develop.svn.wordpress.org/trunk@32294 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-24 18:57:07 +00:00
Boone Gorges
7add279793 Allow rewrite endpoints to be registered without also registering query vars.
Passing `false` to `add_rewrite_endpoint()` will now allow you to take
advantage of the rewrite API without thereby modifying the way that WP sets up
the main query from the request URI.

This new functionality allows developers to work around certain edge-case bugs,
such as when a proper endpoint request (such as `/test/1/`) would short-
circuit `is_home()` calculation when a static front page is set.

Props mordauk, boonebgorges.
Fixes #25143.

git-svn-id: https://develop.svn.wordpress.org/trunk@32293 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-24 16:37:12 +00:00
Boone Gorges
000f4f98b4 In wp_list_categories(), 'All' link should point to post type archive if taxonomy is not registered for 'post' or 'page'.
Instead, we point to the post type archive of the first registered
object_type that supports archives.

Props stevegrunwell, hrishiv90, boonebgorges.
Fixes #21881.

git-svn-id: https://develop.svn.wordpress.org/trunk@32292 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-24 14:56:37 +00:00
Helen Hou-Sandi
f8140ca961 Trunk is now 4.3-alpha.
git-svn-id: https://develop.svn.wordpress.org/trunk@32280 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-23 17:59:53 +00:00
Drew Jaynes
387b6a9087 Post 4.2-RC4 bump
git-svn-id: https://develop.svn.wordpress.org/trunk@32271 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-22 20:29:15 +00:00
Drew Jaynes
66b48f847a WordPress 4.2-RC4
git-svn-id: https://develop.svn.wordpress.org/trunk@32270 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-22 20:21:00 +00:00
Dominik Schilling (ocean90)
f029572866 Theme Switcher: Provide an easier way to reset back to the current active theme.
* Add control for the active theme when doing a theme preview
* Highlight an active theme and move it to the top

props valendesigns, ocean90.
fixes #32002.

git-svn-id: https://develop.svn.wordpress.org/trunk@32265 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-22 16:15:01 +00:00
Gary Pendergast
cc8a9824c5 WPDB: When sanity checking a string by sending it to MySQL for conversion checks, the incorrect data structure was being returned from wpdb::strip_invalid_text(), causing all write queries to fail for some character sets when the query contained non-ASCII characters.
See #32051.



git-svn-id: https://develop.svn.wordpress.org/trunk@32261 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-22 15:01:25 +00:00
Helen Hou-Sandi
3fb766782d Don't add a class for comment authors who are members of the current site.
Reverts [32245] and [31518]. We'll keep the whitespace and comment clarification, though.

see #24054.


git-svn-id: https://develop.svn.wordpress.org/trunk@32259 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-21 23:35:55 +00:00
Andrew Ozz
925682e2d1 Revert editing of video embed parameters in the media modal, [31620] and [31626] for now. Plan on revisiting in 4.3.
Props iseulde. Fixes #31139, fixes #32006.

git-svn-id: https://develop.svn.wordpress.org/trunk@32258 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-21 22:40:23 +00:00
Andrew Ozz
312edcbc9d TinyMCE wpView: properly deselect views when hiding the editor. Do not remove selected on PreProcess.
Fixes #32045.

git-svn-id: https://develop.svn.wordpress.org/trunk@32257 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-21 21:31:26 +00:00
Andrew Ozz
89dee9f379 TinyMCE wpView: ensure contentNode is passed to all callbacks.
Props iseulde. Fixes #31669.

git-svn-id: https://develop.svn.wordpress.org/trunk@32255 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-21 18:35:50 +00:00
Gary Pendergast
7bfffc9b18 Bump version number for nightly builds.
git-svn-id: https://develop.svn.wordpress.org/trunk@32249 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-21 15:24:29 +00:00
Gary Pendergast
48a9127a87 Trunk is now 4.2-RC3.
git-svn-id: https://develop.svn.wordpress.org/trunk@32248 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-21 14:42:12 +00:00
Helen Hou-Sandi
345397aafb Avoid a PHP notice when adding an embed via Insert from URL.
props iseulde.
see #32006, #29476.


git-svn-id: https://develop.svn.wordpress.org/trunk@32247 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-21 14:35:40 +00:00