Commit Graph

1399 Commits

Author SHA1 Message Date
Drew Jaynes
25829e05fa Add line-wrapping to a long return description because readability in documentation is important.
See [32797]. See #32421.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-16 23:18:25 +00:00
Andrew Ozz
82fcdec660 Editor: do not reuse the preview tab when the user has navigated away.
See #32588.
Built from https://develop.svn.wordpress.org/trunk@32809


git-svn-id: http://core.svn.wordpress.org/trunk@32780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-16 23:13:26 +00:00
Scott Taylor
5c6b63d3a6 if is a statment, not a function.
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-16 20:01:25 +00:00
Scott Taylor
efbb8fa4e5 Document the default list of allowed protocols in the doc block for wp_allowed_protocols() and cross-reference in esc_url() and the kses_allowed_protocols filter.
Props GunGeekATX.
Fixes #32421.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32768 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-16 19:45:26 +00:00
Jeremy Felt
947eef9468 Introduce get_main_network_id()
Expand on the logic previously available as part of `is_main_network()` and provide a way to obtain the ID of the main network. Most useful in multi-network configurations.

Props @johnjamesjacoby for the initial patch.
Fixes #30294.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-14 21:45:25 +00:00
Scott Taylor
19a3aacc94 Add @static* annotations where they are missing.
Initialize all static vars that are not, most to `null`.

See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-29 15:43:29 +00:00
Scott Taylor
89a6ace623 Add missing doc blocks to wp-includes/functions.php.
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-25 16:11:25 +00:00
Jeremy Felt
3471545942 s/anbled/enabled/ in global_terms_enabled filter documentation.
Fixes #32436.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32483 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-19 06:35:25 +00:00
John Blackbourn
1c40b495a1 Add a viewport meta tag to wp_die().
Props leogopal

Fixes #29336

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


git-svn-id: http://core.svn.wordpress.org/trunk@32471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-13 04:08:25 +00:00
Andrew Nacin
62d845f32b Add a comment to maybe_serialize().
Built from https://develop.svn.wordpress.org/trunk@32458


git-svn-id: http://core.svn.wordpress.org/trunk@32428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-08 16:27:27 +00:00
Boone Gorges
d9e8492ea8 Add 'webcal' to the list of URI protocols whitelisted by default.
Fixes #31666.
Built from https://develop.svn.wordpress.org/trunk@32346


git-svn-id: http://core.svn.wordpress.org/trunk@32317 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-05 00:38:27 +00:00
Sergey Biryukov
cb1ad98015 Fix typo in a comment in wp_guess_url().
props ixkaito.
fixes #32179.
Built from https://develop.svn.wordpress.org/trunk@32325


git-svn-id: http://core.svn.wordpress.org/trunk@32296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-29 07:19:29 +00:00
Gary Pendergast
024e7bbd46 Revert [30640], as it was incorrectly checking some filenames.
Built from https://develop.svn.wordpress.org/trunk@32171


git-svn-id: http://core.svn.wordpress.org/trunk@32146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-20 06:39:25 +00:00
Dominik Schilling
64fc7294b6 Use HTTPS URLs for codex.wordpress.org.
see #27115.
Built from https://develop.svn.wordpress.org/trunk@32116


git-svn-id: http://core.svn.wordpress.org/trunk@32095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-12 21:29:32 +00:00
Gary Pendergast
acef02f060 Smilies: One more tweak to matching smilies with emoji.
Props iseulde.

See #31709.


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


git-svn-id: http://core.svn.wordpress.org/trunk@32086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-11 02:17:29 +00:00
Gary Pendergast
56f59c2ad7 Smilies: Tweak which smiley matches which emoji.
Props iseulde.

See #31709.


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


git-svn-id: http://core.svn.wordpress.org/trunk@32084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-10 06:30:26 +00:00
Gary Pendergast
b7c7882d1c Smilies: Update our few remaining smilies to better align with Twemoji, and add frownie.png until Twemoji provide a build containing it.
Props joen.

See #31709.


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


git-svn-id: http://core.svn.wordpress.org/trunk@32083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-10 06:20:26 +00:00
Boone Gorges
481352bd2e Avoid the use of array_replace() in add_query_arg().
`array_replace()` was introduced PHP 5.3+. Instead, we walk the array manually.

See [31966].

Fixes #31306.
Built from https://develop.svn.wordpress.org/trunk@31967


git-svn-id: http://core.svn.wordpress.org/trunk@31946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-01 19:40:26 +00:00
Scott Taylor
c113cb5130 Respect numerical keys in add_query_arg(), use array_replace() instead of array_merge().
Adds unit test.

Props tyxla.
Fixes #31306.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-01 19:15:31 +00:00
Drew Jaynes
79f58d9d40 Clarify the DocBlock summary for wp_scheduled_delete() to mention that it includes posts of any type where the 'trash' status is used.
Props dkotter for the initial patch.
Fixes #31757.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-25 22:45:27 +00:00
Andrew Ozz
64f1a8a992 TinyMCE: fix error and PHP warning when adding more than one instance in RTL mode.
Part props maimairel. Fixes #31578.
Built from https://develop.svn.wordpress.org/trunk@31874


git-svn-id: http://core.svn.wordpress.org/trunk@31853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-24 20:33:27 +00:00
Gary Pendergast
46e2a65cf1 Add emoji support, with Twemoji fallback.
Replace exisiting smilies with equivalent emoji, or with shiny new smiley images where no emoji existed.

Props batmoo, joen and mkaz for the original plugin upon which this is based.

Props pento, iseulde, kraftbj and peterwilsoncc for making the internet's dreams come true.

See #31242


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


git-svn-id: http://core.svn.wordpress.org/trunk@31714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-11 22:49:28 +00:00
Drew Jaynes
a49cd7851b Add an entry to the changelog for wp_get_mime_types() mentioning that GIMP (xcf) file support was added in 4.2.
See [31578].
Fixes #31146.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-01 07:10:26 +00:00
Scott Taylor
7994009296 Support GIMP files in the Media Library. We already support Photoshop files.
Props MikeHansenMe.
Fixes #31146.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 19:47:25 +00:00
Scott Taylor
f6b1b01ecd Make a new function, wp_delete_file(). Use it.
Props scribu, wonderboymusic.
Fixes #17864.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 16:51:25 +00:00
Scott Taylor
7cb45f2402 Don't call the size function count() as part of a test condition in loops. Compute the size beforehand, and not on each iteration.
Scrutinizer added a Performance label: these are the only violations.

See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 05:48:24 +00:00
Boone Gorges
6505278ea7 Improve documentation for return value of wp_list_pluck().
`wp_list_pluck()` will preserve the original array keys if no `$index_key`
parameter is provided. This changeset updates the documentation accordingly.

Props adamsilverstein.
Fixes #31316.
Built from https://develop.svn.wordpress.org/trunk@31451


git-svn-id: http://core.svn.wordpress.org/trunk@31432 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-13 16:52:27 +00:00
Scott Taylor
bc55996a0b @param cleanup:
* `get_metadata()` will return literally anything, needs to be `mixed`
* `wp()` and `WP_Query::__construct()` no longer just take a query string
* Clarify a few others

See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 19:03:23 +00:00
Drew Jaynes
f2bc30c03f Ensure we're using the correct @ignore phpDocumentor tag to mark elements that should be skipped when parsing.
Up to this point, various core elements' DocBlocks incorrectly included an `@internal` tag as a means for skipping the parsing process. When paired with a description (inline or otherwise), `@internal` is a valid tag meant to provide internal-only context, but not necessarily to skip parsing the entire element.

See #30987.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-13 00:51:21 +00:00
Scott Taylor
ac654632fe Use PHP_SAPI constant instead of php_sapi_name() in iis7_supports_permalinks(), wp_fix_server_vars(), and wp_redirect().
See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-10 04:59:22 +00:00
Scott Taylor
60b0cd7943 The keyword elseif should be used instead of else if so that all control keywords look like single words.
This was a mess, is now standardized across the codebase, except for a few 3rd-party libs. 

See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 07:05:25 +00:00
Scott Taylor
29cd3fa5bf PHP keywords and constants "true", "false", "null" should be in lower case - there was one lingering capitalized false in _http_build_query().
See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 06:14:23 +00:00
Gary Pendergast
e6a74136f9 size_format() incorrectly included a trailing space for B values: less than 1024 bytes.
Also add a unit test to check for this, so we don't do it again.

Fixes #30908.

Props tillkruess.
 

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


git-svn-id: http://core.svn.wordpress.org/trunk@31033 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-05 13:13:23 +00:00
Scott Taylor
be59efcfbf ImageMagick expects TIFF files to have .tiff as an extension, so the key in wp_get_mime_types() should be 'tiff|tif' not 'tif|tiff' so the proper extension is returned in WP_Image_Editor->get_extension() subclass invocations.
Fixes #30211.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-04 03:09:22 +00:00
Scott Taylor
a0df295f5c Improve various @param docs.
See #30224.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 23:24:25 +00:00
Drew Jaynes
bffe95d34c Docs Formatting: Backtick-escape inline code for all remaining dynamic hook docs in wp-includes/*.
Affects DocBlocks for the following hooks:
* `auth_post_meta_{$meta_key}`
* `term_links-$taxonomy`
* `customize_render_control_ . $this->id`
* `customize_render_panel_{$this->id}`
* `customize_render_section_{$this->id}`
* `customize_preview_{$this->id}`
* `customize_save_ . $this->id_data[ 'base' ]`
* `customize_update_ . $this->type`
* `customize_value_ . $this->id_data[ 'base' ]`
* `customize_sanitize_js_{$this->id}`
* `comment_form_field_{$name}`
* `comment_{$old_status}_to_{$new_status}`
* `comment_{$new_status}_{$comment->comment_type}`
* `extra_{$context}_headers`
* `get_template_part_{$slug}`
* `get_the_generator_{$type}`
* `get_{$adjacent}_post_join`
* `get_{$adjacent}_post_where`
* `get_{$adjacent}_post_sort`
* `{$adjacent}_post_rel_link`
* `{$adjacent}_post_link`
* `{$adjacent}_image_link`
* `blog_option_{$option}`
* `$permastructname . _rewrite_rules`
* `{$type}_template`
* `theme_mod_{$name}`
* `pre_set_theme_mod_$name`
* `current_theme_supports-{$feature}`
* `get_user_option_{$option}`
* `edit_user_{$field}`
* `pre_user_{$field}`
* `user_{$field}`

See #30552.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 12:10:23 +00:00
Scott Taylor
4718bf4f76 Adjust the RegEx in wp_check_filetype() to be aware that query strings are thing that exist sometimes in URLs.
Adds unit tests.

Props voldemortensen.
Fixes #30377.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 06:33:23 +00:00
Drew Jaynes
a1f244d454 Improve line-wrapping and formatting in the DocBlock for wp_send_json_error().
See #30469.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-28 11:39:22 +00:00
Drew Jaynes
68432b0cd1 4.1 Docs Audit: Ensure optional arguments in wp_json_encode() are properly documented as such.
See #30469.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-28 11:36:23 +00:00
Gary Pendergast
a62fc4e4e5 When json_encode() returns a JSON string containing 'null' in PHP 5.4 or earlier, wp_json_encode() will now sanity check the data, as older versions of PHP failed to encode non UTF-8 characters correctly, instead returning 'null'.
Fixes #30471.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30550 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-25 05:01:23 +00:00
Drew Jaynes
07c58f5cca Ensure inline code is markdown-escaped as such, HTML tags are removed from summaries, and that code snippets in descriptions are properly indented.
Affects DocBlocks for the following core elements:
* Markdown-indent a code snippet in the description for `_deprecated_argument()`
* Markdown-indent a code snippet in the description for `wp_localize_script()`
* Backtick-escape HTML tags in two parameter descriptions for `wp_register()`
* Various DocBlock formatting in the description for `get_bloginfo()`
* Remove HTML tag from the summary for `_wp_render_title_tag()`
* Backtick-escape a HTML tag in the description for `get_archives_link()`
* Markdown-indent a code snippet in the description for `wp_admin_css_color()`
* Markdown-indent a code snippet in the description for the `welcome_panel` hook

Props rarst.
See #30473.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-24 05:39:22 +00:00
Drew Jaynes
0fb8811fb6 Improve return description for get_file_data() documentation.
Also convert an incorrect use of `@see` to `@link`.

Props 5um17 for the initial patch.
Fixes #30466.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30521 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-23 17:57:22 +00:00
John Blackbourn
b66c58f76a Update the inline docs for wp_die() to reflect parameter changes made in r30355
See #10551

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


git-svn-id: http://core.svn.wordpress.org/trunk@30496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-21 17:08:23 +00:00
John Blackbourn
53a9e3b420 Add support for WP_Error objects passed to wp_send_json_error(). The error object gets output as an array of error codes and messages, rather than as an empty object.
Fixes #28978
Props paulschreiber

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


git-svn-id: http://core.svn.wordpress.org/trunk@30495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-21 16:56:23 +00:00
Drew Jaynes
5943966b69 Ensure the mixed type of string|int is reflected on the $title parameter in wp_die().
The ability to pass an error code as short-hand to the `$title` and `$args` parameters was added in r30355. Changes also include cleaned-up formatting and line-wraps for other documentation in the DocBlock.

See [30355]. Fixes #10551.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-18 16:47:23 +00:00
John Blackbourn
d88ed475b0 Switch to a 403 response code in places where it is more appropriate than a 500 due to permissions errors.
Fixes #10551
Props nacin

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


git-svn-id: http://core.svn.wordpress.org/trunk@30355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-16 06:16:22 +00:00
John Blackbourn
5f30f13780 Allow the response code to be passed as a shorthand to the $title or $args parameter of wp_die(), for brevity.
See #10551 and #11286
Props nacin

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


git-svn-id: http://core.svn.wordpress.org/trunk@30354 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-16 06:11:22 +00:00
Boone Gorges
89526ca7f1 Ignore case when checking string 'false' in wp_validate_boolean().
Props TobiasBg, kitchin.
Fixes #30238.
Built from https://develop.svn.wordpress.org/trunk@30207


git-svn-id: http://core.svn.wordpress.org/trunk@30207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-03 15:55:23 +00:00
Scott Taylor
3e4ca28eb9 Correct the @param type for the $query arg for remove_query_arg().
See #30224.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-03 05:29:22 +00:00
Scott Taylor
fbd6efdfb8 In _wp_json_convert_string(), when $use_mb is false, perhaps pass a variable that actually exists to wp_check_invalid_utf8().
Introduced in [30055].
See #30224.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-01 22:00:24 +00:00
Drew Jaynes
66c47f29bb Correct references of @uses $wpdb in core documentation to use @global.
See #30191, [30105].
Fixes #30217.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-31 17:56:22 +00:00
Drew Jaynes
f8657d5890 Remove redundant and erroneous @uses tag from most core inline documentation.
Per our inline documentation standards, no further use of the `@uses` tag is recommended as used and used-by relationships can be derived through other means. This removes most uses of the tag in core documentation, with remaining tags to be converted to `@global` or `@see` as they apply.

Fixes #30191.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-30 01:05:24 +00:00
Mark Jaquith
a81a321f9a Docs and code standards cleanup for [30055] (wp_json_encode() & friends)
fixes #28786
props TobiasBg
Built from https://develop.svn.wordpress.org/trunk@30078


git-svn-id: http://core.svn.wordpress.org/trunk@30078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-28 21:29:23 +00:00
Scott Taylor
315612a96b Adjust caching for get_term_by() calls:
* Remove md5 hashes for term name cache keys
* Remove the namespace for the keys for `names` and `slugs` and add them to the group names
* Remove `wp_get_last_changed()`, which @nacin hated
 
Props tollmanz.
Fixes #21760.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-28 21:05:23 +00:00
Gary Pendergast
3495fa40df Fix a PHPDoc typo for wp_json_encode().
Props JustinSainton.

See #28786.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30058 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-28 18:54:18 +00:00
Gary Pendergast
007ec52958 Add wp_json_encode(), a wrapper for json_encode() that ensures everything is converted to UTF-8.
Change all core calls from `json_encode()` to `wp_json_encode()`.

Fixes #28786.


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


git-svn-id: http://core.svn.wordpress.org/trunk@30055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-28 18:35:19 +00:00
Scott Taylor
84a26a78a8 Cache get_term_by() calls:
* Add a helper function, `wp_get_last_changed()`, to retrieve a last-modified timestamp by cache group
* When caching a term, also make cache entries for slug and name via `slug:{$term_id}` and `name:{$term_id}` keys in the `$taxonomy:$last_changed` bucket that reference the term_id
* In `clean_term_cache()` and `update_term_cache()`, respect `$_wp_suspend_cache_invalidation`
* Original term cache entries maintain BC

Adds unit tests.

Props wonderboymusic, tollmanz, boonebgorges.
Fixes #21760.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-16 04:45:17 +00:00
Scott Taylor
b98f03669c Allow PSDs (Photoshop documents) to be uploaded.
Props michalzuber, ccprice.
Fixes #28805.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-03 19:52:17 +00:00
Mark Jaquith
0d3b83551f Use HTTPS URLs for core.trac.wordpress.org
see #27115
Built from https://develop.svn.wordpress.org/trunk@29788


git-svn-id: http://core.svn.wordpress.org/trunk@29560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-29 13:28:16 +00:00
Scott Taylor
491c91196f wp_extract_urls() needs to also grab URLs with query strings and hashes.
Updates unit test.

Props hauvong, dlh.
Fixes #29314.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-23 02:50:19 +00:00
Scott Taylor
69dbf4f5df Clarify that get_the_date(), get_the_time(), get_post_time() and get_post_modified_time() should return false when get_post() is null.
Adds unit tests.

Props GaryJ, SergeyBiryukov, tollmanz.
Fixes #28310.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-01 18:40:16 +00:00
Sergey Biryukov
aca4a37c1d Make sure phpinfo() is not disabled before calling it in apache_mod_loaded().
props rohan013, harmr.
fixes #26772.
Built from https://develop.svn.wordpress.org/trunk@29330


git-svn-id: http://core.svn.wordpress.org/trunk@29110 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-30 17:28:17 +00:00
Dominik Schilling
241addd9ab Revert [28894] as it's currently unused in core.
see #28487.
Built from https://develop.svn.wordpress.org/trunk@29309


git-svn-id: http://core.svn.wordpress.org/trunk@29091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-27 17:16:17 +00:00
Drew Jaynes
c5a59037f1 Inline documentation cleanup for 4.0 audit.
Various improvements:
* Adds `@see` reference for `wp_list_comments()` in 'wp_list_comments_args' filter docs, added in [28285]
* Various phpDoc tweaks for the 'run_wptexturize' filter docs, added in [28715]
* Sentence and wrapping changes for `is_https_url()`, added in [28894]
* Documents the `$args` parameter for `wp_dropdown_languages()`, added in [29007]
* Adds a period to the parameter description for `_update_posts_count_on_delete()`, added in [28835]
* Documents a global in `is_customize_preview()`, added in [28999]
* phpDoc tweaks, adds an access modifier for `wpdb::esc_like()`, added in [28711]

See #28885.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-14 01:02:15 +00:00
Drew Jaynes
f5b5b89e66 Fix inconsistent language in two function descriptions in wp-includes/functions.php.
Also adds correct coding standards to a code sample in `_deprecated_argument()`.

Props TobiasBg.
Fixes #26185.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-07 07:08:15 +00:00
Drew Jaynes
9f8ddaa627 General inline documentation improvements in wp-includes/functions.php.
Final run. Fixes #26185.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-07 06:19:14 +00:00
Sergey Biryukov
440c78d405 Some fixes for get_weekstartend() docs.
see #26185.
Built from https://develop.svn.wordpress.org/trunk@28937


git-svn-id: http://core.svn.wordpress.org/trunk@28735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-01 14:59:15 +00:00
Drew Jaynes
300c53e6fe General inline documentation improvements in wp-includes/functions.php.
Second run. See #26185.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-01 01:44:15 +00:00
Sergey Biryukov
f7703c03d3 Remove free-spacing modifier and extra spaces from wp_extract_urls() pattern.
fixes #28222.
Built from https://develop.svn.wordpress.org/trunk@28933


git-svn-id: http://core.svn.wordpress.org/trunk@28731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-30 23:09:16 +00:00
Drew Jaynes
c97a364b79 General inline documentation improvements in wp-includes/functions.php.
First run. See #26185.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28717 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-30 03:56:15 +00:00
Drew Jaynes
36be4e5703 Improve inline documentation for date_i18n(), _http_build_query(), wp_checkdate(), and wp_auth_check().
Props morganestes.
See #26185.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-30 03:47:16 +00:00
Andrew Nacin
708f73ccc9 Add index key support for wp_list_pluck(), à la array_column().
props trepmal.
fixes #28666.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-29 21:26:17 +00:00
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