Commit Graph

257 Commits

Author SHA1 Message Date
Drew Jaynes
6e665d1f15 Docs: Link to the "Conditional Tags" article in the Theme Developer Handbook from the descriptions for a variety of core conditional tag functions.
These notations largely serve to direct consumers (of both the source and the parsed code reference) to extended information on individual and related conditional tags throughout WordPress. The changeset also standardizes corresponding DocBlock summaries to use third-person singular verbs.

Notations been added for the following functions:

* comments_open()
* email exists()
* has_excerpt()
* has_post_thumbnail()
* has_tag()
* in_category()
* in_the_loop()
* is_404()
* is_active_sidebar()
* is_active_widget()
* is_admin()
* is_admin_bar_showing()
* is_archive()
* is_attachment()
* is_author()
* is_blog_installed()
* is_category()
* is_comments_popup()
* is_date()
* is_day()
* is_dynamic_sidebar()
* is_feed()
* is_front_page()
* is_home()
* is_local_attachment()
* is_main_query
* is_month()
* is_multi_author
* is_new_day()
* is_page()
* is_page_template()
* is_paged()
* is_plugin_active()
* is_plugin_active_for_network()
* is_plugin_inactive()
* is_plugin_page()
* is_post_type_archive()
* is_preview()
* is_rtl()
* is_search()
* is_single()
* is_singular()
* is_sticky()
* is_tag()
* is_tax()
* is_taxonomy_hierarchical()
* is_time()
* is_trackback()
* is_user_logged_in()
* is_year()
* pings_open()
* post_type_exists()
* taxonomy_exists()
* term_exists()
* username exists()
* wp_attachment_is_image()
* wp_script_is()

Props janalwin.
Fixes #43254.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-13 16:54:31 +00:00
Sergey Biryukov
dc4241986b General: Correct _deprecated_function() calls in debug_fopen(), debug_fwrite(), and debug_fclose().
The second parameter is supposed to be the version number, the replacement function should be the third parameter.

Props milindmore22, jdgrimes.
Fixes #41094.
Built from https://develop.svn.wordpress.org/trunk@41787


git-svn-id: http://core.svn.wordpress.org/trunk@41621 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-07 00:40:52 +00:00
John Blackbourn
9fdbe6538e Docs: Remove & prefixes from parameter documentation to avoid doc parsing errors.
Props sudar for the original patch.

See #35974

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


git-svn-id: http://core.svn.wordpress.org/trunk@41520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 22:03:33 +00:00
Andrew Ozz
a5f8097899 Retire Press This and extract it to a plugin. First run.
Props kraftbj, azaozz.
See #41689.
Built from https://develop.svn.wordpress.org/trunk@41584


git-svn-id: http://core.svn.wordpress.org/trunk@41417 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-24 14:22:54 +00:00
John Blackbourn
28eda6f4bc General: Improve terminology used when referring to installations of WordPress and its extensions.
"Install" is not a noun, and while it might be acceptable to use the verb as a noun, it is not correct. Using the correct
noun, "installation", increases clarity, especially for non-native English speakers.

This change fixes the usage in user-facing text and in developer documentation.

Fixes #41620

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


git-svn-id: http://core.svn.wordpress.org/trunk@41129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-22 11:52:48 +00:00
John Blackbourn
4cdbe950e9 Docs: Add a missing docblock for the the_content_rss filter.
See #38462, #41017

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


git-svn-id: http://core.svn.wordpress.org/trunk@41056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 14:46:43 +00:00
Drew Jaynes
0401cee8b3 Docs: Reduce confusion in @since MU notationss by indicating the WP version (3.0.0) the code was merged into core while retaining the original context.
Props sathyapulse.
Fixes #41509.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-01 20:44:43 +00:00
Drew Jaynes
75acd01f98 Docs: Notate format_for_editor() as the replacement function in the DocBlock for the deprecated wp_richedit_pre().
Props rabmalin.
See #41121. Fixes #40709.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 22:10:41 +00:00
Drew Jaynes
acea6cbad8 Improve the usefulness of several _deprecated_function() calls by passing known replacement functions, methods, or hooks.
Props jrf.
See #41121.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 00:05:44 +00:00
Sergey Biryukov
3fd9465cc1 Docs: Make @deprecated entry for wp_kses_js_entities(), deprecated in [38785], consistent with other entries.
Props stevenkword, teinertb.
Fixes #39541.
Built from https://develop.svn.wordpress.org/trunk@39758


git-svn-id: http://core.svn.wordpress.org/trunk@39696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-10 22:09:42 +00:00
Drew Jaynes
5f4497f0af Docs: Fix multiple trivial typos throughout a variety of core files.
Props ottok.
Fixes #38489.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 06:28:32 +00:00
Dominik Schilling
7cce73a634 General: Introduce a wp_list_sort() helper function, v2.
In addition to `wp_list_filter()` for filtering a list of objects, and `wp_list_pluck()` for plucking a certain field out of each object in a list, this new function can be used for sorting a list of objects by specific fields. These functions are now all contained within the new `WP_List_Util()` class and `wp_list_sort()` is used in various parts of core for sorting lists.

This was previously committed in [38859] but got reverted in [38862] and [38863]. To fix the previous issues, `wp_list_sort()` supports now an additional argument to preserve array keys via `uasort()`.

Props flixos90, DrewAPicture, jorbin.
Fixes #37128.
Built from https://develop.svn.wordpress.org/trunk@38928


git-svn-id: http://core.svn.wordpress.org/trunk@38871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 21:26:32 +00:00
Dominik Schilling
6c8508023f Revert [38859] due to an incomplete implementation.
See https://core.trac.wordpress.org/ticket/37128#comment:27.
See #37128.
Built from https://develop.svn.wordpress.org/trunk@38863


git-svn-id: http://core.svn.wordpress.org/trunk@38806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 17:01:32 +00:00
Pascal Birchler
f54558e75b General: Introduce a wp_list_sort() helper function.
In addition to `wp_list_filter()` for filtering a list of objects, and `wp_list_pluck()` for plucking a certain field out of each object in a list, this new function can be used for sorting a list of objects by specific fields. These functions are now all contained within the new `WP_List_Util()` class and `wp_list_sort()` is used in various parts of core for sorting lists.

Props flixos90, DrewAPicture, jorbin.
Fixes #37128.
Built from https://develop.svn.wordpress.org/trunk@38859


git-svn-id: http://core.svn.wordpress.org/trunk@38802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 11:12:51 +00:00
Gary Pendergast
456f8015b7 KSES: Deprecate wp_kses_js_entities().
This function was originally introduced to fix an XSS attack in Netscape 4, which never affected any other browsers, or later versions of Netscape.

I'm willing to go out on a limb, and say that we've officially dropped security support for Netscape 4.

Props dmsnell, desrosj.
Fixes #33848.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-13 22:25:31 +00:00
John Blackbourn
c0f1a49575 Themes: Remove paged.php from the theme template hierarchy.
The position of this template within the hierarchy is of so little use that zero themes in the WordPress.org theme directory make use of it. It's second only to `index.php` in the hierarchy, meaning that any archive template such as `category.php` or `archive.php` will be chosen before it.

Fixes #38162
Props ryankienstra for initial patch

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


git-svn-id: http://core.svn.wordpress.org/trunk@38698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 21:03:31 +00:00
Sergey Biryukov
d790e246d5 Docs: Correct @see entry for clean_url().
Props rabmalin.
Fixes #38126.
Built from https://develop.svn.wordpress.org/trunk@38641


git-svn-id: http://core.svn.wordpress.org/trunk@38584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-22 09:40:31 +00:00
Scott Taylor
e5225324a2 Multisite: use get_current_blog_id() where applicable, in lieu of plucking the $blog_id global from outer space.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 04:55:54 +00:00
Sergey Biryukov
51e1539ab7 I18N: Add translator comments for strings in wp-includes/deprecated.php.
Props ramiy.
Fixes #37797.
Built from https://develop.svn.wordpress.org/trunk@38343


git-svn-id: http://core.svn.wordpress.org/trunk@38284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 23:36:28 +00:00
Dominik Schilling
aa561e67a1 Bootstrap: Enhance core's memory limit handling.
* Don't lower memory limit if the current limit is greater than `WP_MAX_MEMORY_LIMIT`.
* Set `WP_MEMORY_LIMIT` and `WP_MAX_MEMORY_LIMIT` to current limit if the `memory_limit` setting can't be changed at runtime.
* Use `wp_convert_hr_to_bytes()` when parsing the value of the `memory_limit` setting because it can be a shorthand or an integer value.
* Introduce `wp_raise_memory_limit( $context )` to raise the PHP memory limit for memory intensive processes. This DRYs up some logic and includes the existing `admin_memory_limit` and `image_memory_limit` filters. The function can also be used for custom contexts, the `{$context}_memory_limit` filter allows to customize the limit.
* Introduce `wp_is_ini_value_changeable( $setting )` to determine whether a PHP ini value is changeable at runtime.
* Remove a `function_exists( 'memory_get_usage' )` check. Since PHP 5.2.1 support for memory limit is always enabled.

Related commits: [38011-38013]

Props jrf, A5hleyRich, swissspidy, ocean90.
Fixes #32075.
Built from https://develop.svn.wordpress.org/trunk@38015


git-svn-id: http://core.svn.wordpress.org/trunk@37956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-08 14:37:30 +00:00
Sergey Biryukov
139387b7e5 Docs: Use 3-digit, x.x.x-style semantic versioning for _doing_it_wrong(), _deprecated_function(), _deprecated_argument(), and _deprecated_file() throughout core.
Props metodiew.
Fixes #36495.
Built from https://develop.svn.wordpress.org/trunk@37985


git-svn-id: http://core.svn.wordpress.org/trunk@37926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-06 12:40:29 +00:00
Pascal Birchler
ae56f468e3 Embeds: Remove support for Google Video.
While the service has been retired for years, it now has completely stopped working. Thus there is no reason to keep it.

Props Viper007Bond.
Fixes #36304.
Built from https://develop.svn.wordpress.org/trunk@37744


git-svn-id: http://core.svn.wordpress.org/trunk@37709 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-18 09:47:29 +00:00
Sergey Biryukov
70984aeb6f In size_format() and wp_convert_bytes_to_hr(), replace kB with KB for consistency with other units.
Props Presskopp, dashaluna.
Fixes #37037.
Built from https://develop.svn.wordpress.org/trunk@37702


git-svn-id: http://core.svn.wordpress.org/trunk@37668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-14 21:41:28 +00:00
Joe McGill
820d7174c2 Media: remove _wp_upload_dir_baseurl().
`_wp_upload_dir_baseurl()` is a private function introduced in 4.4
as part of the "responsive images" feature. It was for runtime
caching of the URL to the uploads directory. It is deprecated in
4.5 with the introduction of `wp_get_upload_dir()`.

Outside core, it's only used as part of a back-compat shim in the
original feature plugin for responsive images (ricg-responsive-images),
which includes its own version of the function definition, so it's
safe to remove from core.

Fixes #36375.
Built from https://develop.svn.wordpress.org/trunk@37676


git-svn-id: http://core.svn.wordpress.org/trunk@37642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-10 16:52:30 +00:00
Peter Wilson
47d26cd9fb DOCS: Replace HTTP links with HTTPS.
Replaces unsecure links in documentation and translator comments with their secure versions.

Props johnpgreen, netweb

Fixes #36993

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


git-svn-id: http://core.svn.wordpress.org/trunk@37640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-10 04:50:33 +00:00
Drew Jaynes
311f800907 Docs: Ensure hook and duplicate hook docs directly precede all instances of the image_memory_limit filter.
Hook docs must directly precede hooks in order for the Code Reference parser to correctly identify them as such.

Fixes #36968. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@37560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-30 02:14:30 +00:00
Drew Jaynes
da78aeffe9 Docs: Apply inline @see tags to hooks referenced in DocBlocks in a variety of wp-includes/* files.
Applying these specially-crafted `@see` tags allows the Code Reference parser to recognize and link these elements as actions and filters.

See #36921.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-23 18:59:27 +00:00
Drew Jaynes
9cb5247392 Docs: Standardize filter docs in remaining wp-includes/* files to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-22 18:50:28 +00:00
Drew Jaynes
f52a8cb1fa Docs: Remove/replace invalid inline @link tags in DocBlocks in wp-includes/*.
Fixes #36910.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-22 17:39:28 +00:00
Drew Jaynes
b1804afeaf Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs.
Also use 'back-compat' in some inline comments where backward compatibility is the subject and shorthand feels more natural.

Note: 'backwards compatibility/compatibile' can also be considered correct, though it's primary seen in regular use in British English.

Props ocean90.
Fixes #36835.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-13 18:41:31 +00:00
Drew Jaynes
9e4415bc5f Docs: Ignore _wp_upload_dir_baseurl() from parsing for the Code Reference.
See #36371.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-30 15:29:26 +00:00
Andrew Ozz
bfd19e92f5 Add deprecated notice and removal warning to _wp_upload_dir_baseurl().
Props DrewAPicture, azaozz.
Fixes #36371.
Built from https://develop.svn.wordpress.org/trunk@37112


git-svn-id: http://core.svn.wordpress.org/trunk@37079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-30 15:10:27 +00:00
Drew Jaynes
bd3a1d74d9 Docs: Improve a variety of DocBlocks in wp-includes/deprecated.php.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-28 19:32:25 +00:00
Drew Jaynes
f976c0a6c8 Docs: Add missing parameter and return descriptions to the DocBlock for the deprecated default_topic_count_text().
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-28 18:36:27 +00:00
Drew Jaynes
b09aa14358 Docs: Add missing parameter and return documentation to the DocBlock for the deprecated _search_terms_tidy().
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-28 18:35:26 +00:00
Drew Jaynes
49c0c2b7aa Docs: Add missing documentation for the &$post parameter in the DocBlock for the deprecated _get_post_ancestors().
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-28 18:33:25 +00:00
Drew Jaynes
e92ed036cc Docs: Add missing documentation for the $fp parameter to the DocBlock for the deprecated debug_fclose().
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-28 18:31:26 +00:00
Drew Jaynes
85efc3675a Docs: Add missing parameter documentation to the DocBlock for the deprecated debug_fwrite().
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-28 18:30:27 +00:00
Drew Jaynes
b878338b1d Docs: Add missing parameter and return documentation to the DocBlock for the deprecated debug_fopen().
Fixes #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-28 18:20:26 +00:00
Drew Jaynes
d48cd1cb28 Docs: Add missing documentation for the $wp_admin_bar parameter in the DocBlock for the deprecated wp_admin_bar_dashboard_view_site_menu().
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-28 18:18:28 +00:00
Drew Jaynes
268d09070e Docs: Add missing documentation for the $title parameter in the DocBlock for the deprecated parent_post_rel_link().
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-28 18:16:26 +00:00
Drew Jaynes
b64819d3a0 Docs: Remove a duplicate parameter notation in the DocBlock for the deprecated the_editor() function.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-27 21:41:26 +00:00
Andrew Ozz
2d94e025a2 Replace wp_upload_dir() with the new wp_get_upload_dir() in all cases where a file is not being uploaded. Deprecate _wp_upload_dir_baseurl(), and replace it with wp_get_upload_dir().
See #34359.
Built from https://develop.svn.wordpress.org/trunk@36569


git-svn-id: http://core.svn.wordpress.org/trunk@36536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 00:24:27 +00:00
Eric Lewis
22467e840f Networks and sites: Replace "blog" usage with "site" in docs.
Multisite functions use the term "blog" to refer to what we now call a "site," e.g. `get_current_blog_id()`. These functions are here to stay because of our commitment to backwards compatibility. What we can do is set the documentation straight.

See #35417.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-28 03:35:27 +00:00
John Blackbourn
d84621cc19 Docs: Correct a funky docblock in funky_javascript_fix().
See #32246

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


git-svn-id: http://core.svn.wordpress.org/trunk@36076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-28 17:18:30 +00:00
John Blackbourn
0003a004db Docs: Miscellaneous docblock code quality tweaks.
See #32246

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


git-svn-id: http://core.svn.wordpress.org/trunk@36039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-23 07:53:26 +00:00
Drew Jaynes
a28bfe8ba6 Docs: Add missing notations for the optional $tab_index and $extended parameters in the DocBlock for the deprecated the_editor() function.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-20 21:21:27 +00:00
Drew Jaynes
5399b2137f Docs: Add missing parameter and return notations to the DocBlock for the deprecated get_usernumposts() function.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-19 19:41:30 +00:00
Drew Jaynes
013d1178e5 Docs: Add missing parameter and return notations in the DocBlock for get_profile().
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-19 09:04:26 +00:00
Drew Jaynes
543420158f Docs: Properly mark the $classname parameter as optional.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-19 09:00:26 +00:00