Drew Jaynes
991237783d
Add line-wrapping to a long return description because readability in documentation is important.
...
See [32797]. See #32421 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32810 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 23:17:16 +00:00
Andrew Ozz
7ef6ece222
Editor: do not reuse the preview tab when the user has navigated away.
...
See #32588 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32809 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 23:12:21 +00:00
Scott Taylor
296c559baf
if is a statment, not a function.
...
See #32444 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32800 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 20:00:15 +00:00
Scott Taylor
a4765f9e1b
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32797 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 19:44:39 +00:00
Jeremy Felt
7819ac5d16
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32775 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-14 21:44:45 +00:00
Scott Taylor
c8a44d437a
Add @static* annotations where they are missing.
...
Initialize all static vars that are not, most to `null`.
See #32444 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32650 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-29 15:42:40 +00:00
Scott Taylor
531e31b598
Add missing doc blocks to wp-includes/functions.php.
...
See #32444 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32595 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-25 16:10:59 +00:00
Jeremy Felt
365c82b0c9
s/anbled/enabled/ in global_terms_enabled filter documentation.
...
Fixes #32436 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32513 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-19 06:34:18 +00:00
John Blackbourn
8bcd566ee0
Add a viewport meta tag to wp_die().
...
Props leogopal
Fixes #29336
git-svn-id: https://develop.svn.wordpress.org/trunk@32501 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-13 04:07:46 +00:00
Andrew Nacin
df717e8294
Add a comment to maybe_serialize().
...
git-svn-id: https://develop.svn.wordpress.org/trunk@32458 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-08 16:26:13 +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
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
Gary Pendergast
332750a40d
Revert [30640], as it was incorrectly checking some filenames.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@32171 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-20 06:38:08 +00:00
Dominik Schilling (ocean90)
b0d6757918
Use HTTPS URLs for codex.wordpress.org.
...
see #27115 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32116 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-12 21:28:58 +00:00
Gary Pendergast
b007147ab4
Smilies: One more tweak to matching smilies with emoji.
...
Props iseulde.
See #31709 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32107 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-11 02:16:34 +00:00
Gary Pendergast
1de9bc1670
Smilies: Tweak which smiley matches which emoji.
...
Props iseulde.
See #31709 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32105 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-10 06:29:49 +00:00
Gary Pendergast
3bd66eff61
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32104 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-10 06:19:39 +00:00
Boone Gorges
a143f7f03b
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31967 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-01 19:39:24 +00:00
Scott Taylor
d1235e323e
Respect numerical keys in add_query_arg(), use array_replace() instead of array_merge().
...
Adds unit test.
Props tyxla.
Fixes #31306 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31966 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-01 19:14:46 +00:00
Drew Jaynes
9cd90a9a10
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31891 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-25 22:44:26 +00:00
Andrew Ozz
8bbb5869e9
TinyMCE: fix error and PHP warning when adding more than one instance in RTL mode.
...
Part props maimairel. Fixes #31578 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31874 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-24 20:32:23 +00:00
Gary Pendergast
ae391ec226
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
git-svn-id: https://develop.svn.wordpress.org/trunk@31733 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-11 22:48:16 +00:00
Drew Jaynes
c2d677a4a4
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31590 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-01 07:09:48 +00:00
Scott Taylor
7656a776af
Support GIMP files in the Media Library. We already support Photoshop files.
...
Props MikeHansenMe.
Fixes #31146 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31578 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 19:46:19 +00:00
Scott Taylor
212d6d8046
Make a new function, wp_delete_file(). Use it.
...
Props scribu, wonderboymusic.
Fixes #17864 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31575 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 16:50:14 +00:00
Scott Taylor
79706ee8a8
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31554 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-26 05:47:53 +00:00
Boone Gorges
0efce8c89c
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31451 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-13 16:51:55 +00:00
Scott Taylor
5743898e1e
@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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31212 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 19:02:26 +00:00
Drew Jaynes (DrewAPicture)
9b0cf1bd5b
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31170 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-13 00:50:32 +00:00
Scott Taylor
c3bd2252f5
Use PHP_SAPI constant instead of php_sapi_name() in iis7_supports_permalinks(), wp_fix_server_vars(), and wp_redirect().
...
See #30799 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31120 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-10 04:58:49 +00:00
Scott Taylor
6fd11624d1
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31090 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 07:04:40 +00:00
Scott Taylor
8108c0babe
PHP keywords and constants "true", "false", "null" should be in lower case - there was one lingering capitalized false in _http_build_query().
...
See #30799 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31086 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 06:13:05 +00:00
Gary Pendergast
eb4d356e29
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@31052 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-05 13:12:06 +00:00
Scott Taylor
49d19a367a
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31044 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-04 03:08:48 +00:00
Scott Taylor
0632a3de68
Improve various @param docs.
...
See #30224 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30674 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-30 23:23:37 +00:00
Drew Jaynes (DrewAPicture)
e587324180
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30656 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-30 12:09:56 +00:00
Scott Taylor
a411918199
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30640 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-30 06:32:16 +00:00
Drew Jaynes (DrewAPicture)
f7e01d5331
Improve line-wrapping and formatting in the DocBlock for wp_send_json_error().
...
See #30469 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30614 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-28 11:38:59 +00:00
Drew Jaynes (DrewAPicture)
7bf6ff37e2
4.1 Docs Audit: Ensure optional arguments in wp_json_encode() are properly documented as such.
...
See #30469 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30613 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-28 11:35:39 +00:00
Gary Pendergast
0cb93dd166
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30561 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-25 05:00:36 +00:00
Drew Jaynes (DrewAPicture)
d93bfdce56
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30541 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-24 05:38:44 +00:00
Drew Jaynes (DrewAPicture)
4f331ec1df
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30532 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-23 17:56:14 +00:00
John Blackbourn
3afb2efae4
Update the inline docs for wp_die() to reflect parameter changes made in r30355
...
See #10551
git-svn-id: https://develop.svn.wordpress.org/trunk@30507 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-21 17:07:42 +00:00
John Blackbourn
8ea65c3c0d
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
git-svn-id: https://develop.svn.wordpress.org/trunk@30506 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-21 16:55:28 +00:00
Drew Jaynes (DrewAPicture)
aa2c1e6e73
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30379 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-18 16:46:36 +00:00
John Blackbourn
4e1e4745ff
Switch to a 403 response code in places where it is more appropriate than a 500 due to permissions errors.
...
Fixes #10551
Props nacin
git-svn-id: https://develop.svn.wordpress.org/trunk@30356 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-16 06:15:29 +00:00
John Blackbourn
b68026bbfb
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
git-svn-id: https://develop.svn.wordpress.org/trunk@30355 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-16 06:10:58 +00:00
Boone Gorges
2b6df5f8ce
Ignore case when checking string 'false' in wp_validate_boolean().
...
Props TobiasBg, kitchin.
Fixes #30238 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30207 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-03 15:54:42 +00:00
Scott Taylor
2443090c23
Correct the @param type for the $query arg for remove_query_arg().
...
See #30224 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30191 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-03 05:28:47 +00:00
Scott Taylor
5f09d235f0
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30162 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-01 21:59:58 +00:00