Commit Graph

170 Commits

Author SHA1 Message Date
Sergey Biryukov 37662df05e Docs: In various `@return` tags, list the expected type first, instead of `false` or `WP_Error`.
Follow-up to [46696], [47060], [49926], [49927].

See #51800.
Built from https://develop.svn.wordpress.org/trunk@49929


git-svn-id: http://core.svn.wordpress.org/trunk@49628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-04 17:18:04 +00:00
Sergey Biryukov f4d610310c Docs: Synchronize and correct documentation for `has_filter()` and `WP_Hook::has_filter()`.
`WP_Hook::has_filter()` returns true if `$function_to_check` is omitted and the hook being checked has one or more registered callbacks.

Follow-up to [49927].

See #51800.
Built from https://develop.svn.wordpress.org/trunk@49928


git-svn-id: http://core.svn.wordpress.org/trunk@49627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-04 16:58:08 +00:00
John Blackbourn dfe1f9b322 Docs: Promote many `bool` types to `true` or `false` where only that value is used.
See #51800

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


git-svn-id: http://core.svn.wordpress.org/trunk@49626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-03 22:04:04 +00:00
John Blackbourn 53da9208dd Docs: Various docblock corrections particularly relating to boolean types.
See #51800

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


git-svn-id: http://core.svn.wordpress.org/trunk@49625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-03 21:57:09 +00:00
John Blackbourn b2515abd45 Docs: Improve the docs for the globals that are used in the actions and filters API.
See #50531, #50768

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


git-svn-id: http://core.svn.wordpress.org/trunk@48958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-18 19:19:06 +00:00
Sergey Biryukov 69e7e7681b Plugins: Consistently use an empty string as the default value for `$replacement` and `$message` parameters in:
* `_deprecated_function()`
* `_deprecated_constructor()`
* `_deprecated_file()`
* `_deprecated_argument()`
* `_deprecated_hook()`
* `apply_filters_deprecated()`
* `do_action_deprecated()`

This matches the documented type of `string` for these parameters and removes unnecessarily strict `! is_null()` checks.

Follow-up to [46792].

Props jignesh.nakrani, renathoc, SergeyBiryukov.
Fixes #49698.
Built from https://develop.svn.wordpress.org/trunk@48327


git-svn-id: http://core.svn.wordpress.org/trunk@48096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 21:09:03 +00:00
Sergey Biryukov b16368c268 Docs: Remove `@staticvar` tags from core.
The tag was supported in phpDocumentor 1.x, but is no longer supported in 2.x and 3.x.

Usage of static variables is considered an internal implementation detail and has no information value for someone reading the docs.

Props alishanvr, jrf.
Fixes #50426.
Built from https://develop.svn.wordpress.org/trunk@48109


git-svn-id: http://core.svn.wordpress.org/trunk@47878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-20 12:40:12 +00:00
desrosj 27485fd7aa General: Continuing to work towards a passing PHP Compatibility scan.
This is a final pass to fix PHP compatibiilty issues in the codebase with code changes or adding `phpcs:ignore` comments.

With this change, all PHP compatibility warnings and errors without specific tickets have been addressed (see #49810 and #41750).

Props desrosj, johnbillion, jrf.
See #49922.
Built from https://develop.svn.wordpress.org/trunk@47902


git-svn-id: http://core.svn.wordpress.org/trunk@47676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-03 17:40:12 +00:00
Sergey Biryukov 38676936ba Coding Standards: Use strict type check for `in_array()` and `array_search()` where strings are involved.
This reduces the number of `WordPress.PHP.StrictInArray.MissingTrueStrict` issues from 486 to 50.

Includes minor code layout fixes for better readability.

See #49542.
Built from https://develop.svn.wordpress.org/trunk@47550


git-svn-id: http://core.svn.wordpress.org/trunk@47325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-05 03:02:11 +00:00
Sergey Biryukov 47ed56f38f Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant.
This avoids the performance overhead of the function call every time `dirname( __FILE__ )` was used instead of `__DIR__`.

This commit also includes:

* Removing unnecessary parentheses from `include`/`require` statements. These are language constructs, not function calls.
* Replacing `include` statements for several files with `require_once`, for consistency:
 * `wp-admin/admin-header.php`
 * `wp-admin/admin-footer.php`
 * `wp-includes/version.php`

Props ayeshrajans, desrosj, valentinbora, jrf, joostdevalk, netweb.
Fixes #48082.
Built from https://develop.svn.wordpress.org/trunk@47198


git-svn-id: http://core.svn.wordpress.org/trunk@46998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-06 06:33:11 +00:00
Sergey Biryukov 001ffe81fb Docs: Improve inline comments per the documentation standards.
Includes minor code layout fixes for better readability.

See #48303.
Built from https://develop.svn.wordpress.org/trunk@47122


git-svn-id: http://core.svn.wordpress.org/trunk@46922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-29 00:45:18 +00:00
Sergey Biryukov 2900bb8ea7 Docs: Update links to https://secure.php.net/, they now redirect to https://www.php.net/.
See #48303.
Built from https://develop.svn.wordpress.org/trunk@47088


git-svn-id: http://core.svn.wordpress.org/trunk@46888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-20 03:14:06 +00:00
Sergey Biryukov 3047531f6a Plugins: In `_wp_filter_build_unique_id()`, remove `$wp_filter` global and `$filter_id_count` static variable, unused since [46220].
See #47407, #48074.
Built from https://develop.svn.wordpress.org/trunk@46805


git-svn-id: http://core.svn.wordpress.org/trunk@46605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-11-29 22:14:01 +00:00
Sergey Biryukov 49401759f3 Docs: Correct `@param` type for the function parameter in `tests_add_filter()` and `_test_filter_build_unique_id()`.
Synchronize documentation for `add_filter()`, `tests_add_filter()`, `_wp_filter_build_unique_id()`, `_test_filter_build_unique_id()`.

Add a note that `$tag` and `$priority` are no longer used in `_wp_filter_build_unique_id()` since [46220], and the function always returns a string now.

Props donmhico, remcotolsma, SergeyBiryukov.
Fixes #47407. See #48303.
Built from https://develop.svn.wordpress.org/trunk@46801


git-svn-id: http://core.svn.wordpress.org/trunk@46601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-11-29 21:42:01 +00:00
Sergey Biryukov 0aef4faacd Plugins: Correct default value of `$replacement` parameter in `do_action_deprecated()` and `apply_filters_deprecated()`.
This addresses an inconsistency with `_deprecated_hook()`, which uses `is_null()` to check if `$replacement` was provided, however the previous default value was `false`.

Props shaampk1, felipeelia.
Fixes #48817.
Built from https://develop.svn.wordpress.org/trunk@46792


git-svn-id: http://core.svn.wordpress.org/trunk@46592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-11-27 23:55:01 +00:00
Sergey Biryukov 4d8a0a8b33 Docs: Use 3-digit, x.x.x style semantic versioning for `$version` argument in `do_action_deprecated()` and `apply_filters_deprecated()` calls.
Props jrf.
Fixes #48255.
Built from https://develop.svn.wordpress.org/trunk@46689


git-svn-id: http://core.svn.wordpress.org/trunk@46489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-11-09 13:57:03 +00:00
Sergey Biryukov ff65cfcacf Plugins: Restore backward compatibility for PHP4-style passing of `array( &$this )` as action argument to `do_action()`.
This is a follow-up to [46149] to avoid unnecessary breakage in case of using the old notation.

Props david.binda, jrf.
Reviewed by azaozz.
Fixes #48312.
Built from https://develop.svn.wordpress.org/trunk@46568


git-svn-id: http://core.svn.wordpress.org/trunk@46365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-22 00:11:03 +00:00
Sergey Biryukov 8d1e51e9c7 Docs: Add a `@since` note about new parameters with the spread operator added to function signatures.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46451


git-svn-id: http://core.svn.wordpress.org/trunk@46249 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-09 04:28:02 +00:00
whyisjake 304c19dbac Options: `register_uninstall_hook()` causes large amounts of unnecessary option updates.
Prevent extra database read/writes from the the hook.

Props jeichorn, MikeHansenMe, DrewAPicture, Rahe, tha_sun, mikeschroder.
Fixes #31792.


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


git-svn-id: http://core.svn.wordpress.org/trunk@46132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-26 22:08:57 +00:00
Sergey Biryukov 8bb8e77ace Code Modernisation: Introduce the spread operator in `do_action()`.
Rather than relying on `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46322


git-svn-id: http://core.svn.wordpress.org/trunk@46121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-26 13:53:58 +00:00
Sergey Biryukov fe82a615a9 Code Modernization: Remove workarounds for `spl_object_hash()`.
The `spl_object_hash()` function was introduced in PHP 5.2.0. As of PHP 5.3, the PHP SPL extension can no longer be disabled, so these workarounds are no longer needed.

Props jrf.
See #48074.
Built from https://develop.svn.wordpress.org/trunk@46220


git-svn-id: http://core.svn.wordpress.org/trunk@46032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-20 22:34:57 +00:00
Sergey Biryukov a86711e28e Code Modernisation: Remove redundant PHP 4 code from `do_action()`.
As of PHP 5, objects are always passed by reference, so this has not been needed for quite some time.

Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46149


git-svn-id: http://core.svn.wordpress.org/trunk@45961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-16 14:48:54 +00:00
Sergey Biryukov f3f1d530f4 Code Modernisation: Simplify some logic in `apply_filters()`.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46146


git-svn-id: http://core.svn.wordpress.org/trunk@45958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 12:04:55 +00:00
Sergey Biryukov 8e85299a00 General: First pass at replacing Codex URLs with a corresponding HelpHub or DevHub article.
Props ianbelanger, tobifjellner, SergeyBiryukov.
See #47771.
Built from https://develop.svn.wordpress.org/trunk@45674


git-svn-id: http://core.svn.wordpress.org/trunk@45485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-25 22:45:57 +00:00
John Blackbourn e91bf3535c Docs: Correct a function name in the `do_action()` documentation.
See #37402

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


git-svn-id: http://core.svn.wordpress.org/trunk@45232 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-25 22:53:51 +00:00
John Blackbourn 9abcf7881f Docs: Improve and correct documentation for hook-related variadic functions.
See #37402

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


git-svn-id: http://core.svn.wordpress.org/trunk@45231 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-25 22:52:54 +00:00
John Blackbourn 9c6393e967 Docs: Switch to the more common syntax for variadic function documentation.
See #37402

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


git-svn-id: http://core.svn.wordpress.org/trunk@45229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-25 21:59:51 +00:00
Gary Pendergast aaf99e6913 Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-30 23:11:00 +00:00
Adam Silverstein 0a431ea356 Revert "Add `wp.hooks` - JavaScript actions and filters."
Revert `wp.hooks` for now as we continue to refine and test. 

Reverts [41375].

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


git-svn-id: http://core.svn.wordpress.org/trunk@41585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 20:25:49 +00:00
Adam Silverstein f36cccde7e Add `wp.hooks` - JavaScript actions and filters.
Add a JavaScript hooks library with an API that mirrors the WordPress Plugin API; provides similar functionality and API to PHP hooks.

Called via the global `wp.hooks`, eg: `wp.hooks.addAction()`, etc. Adds:

* `addAction( 'hook', 'vendor/plugin/function', callback, priority )`
* `addFilter( 'hook', 'vendor/plugin/function', callback, priority )`
* `removeAction( 'hook', 'vendor/plugin/function' )`
* `removeFilter( 'hook',  'vendor/plugin/function' )`
* `removeAllActions( 'hook' )`
* `removeAllFilters( 'hook' )`
* `doAction( 'hook', arg1, arg2, moreArgs, finalArg )`
* `applyFilters( 'hook', content, arg1, arg2, moreArgs, finalArg )`
* `doingAction( 'hook' )`
* `doingFilter( 'hook' )`
* `didAction( 'hook' )`
* `didFilter( 'hook' )`
* `hasAction( 'hook' )`
* `hasFilter( 'hook' )`

Props adamsilverstein, jnylen0, aduth, kadamwhite, youknowriad, schlessera, mikeschinkel, azaozz, vhauri, CaptainN, scribu, carldanley, chetanchauhan, mgibbs189, stephenharris, justnorris, koopersmith, gcorne, TV productions, atimmer.

Fixes #21170.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41208 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-12 12:54:45 +00:00
Drew Jaynes fabca552aa Docs: Clarify the expected usage of the `$args` parameter as an array in the DocBlock for `apply_filters_deprecated()`, including an example.
See #41017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-23 15:52:46 +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
Gary Pendergast 4dcb7a0fa9 Bootstrap: Use `dirname()` when loading `class-wp-hook.php` from `plugin.php`.
To allow `plugin.php` to be loaded before the rest of WordPress is loaded, it cannot rely on WordPress constants, such as `ABSPATH` and `WPINC`.

Instead, we can assume that `class-wp-hook.php` will be in the same directory as `plugin.php`, so `dirname( __FILE__ )` will give us the correct path to load from.

Props pento, dd32.
Fixes #37707.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-12 01:50:30 +00:00
Gary Pendergast 5a632be944 Hooks: Add the new class `WP_Hook`, and modify hook handling to make use of it.
Filters and actions have been the basis of WordPress' plugin functionality since time immemorial, they've always been a reliable method for acting upon the current state of WordPress, and will continue to be so.

Over the years, however, edge cases have cropped up. Particularly when it comes to recursively executing hooks, or a hook adding and removing itself, the existing implementation struggled to keep up with more complex use cases.

And so, we introduce `WP_Hook`. By changing `$wp_filter` from an array of arrays, to an array of objects, we reduce the complexity of the hook handling code, as the processing code (see `::apply_filters()`) only needs to be aware of itself, rather than the state of all hooks. At the same time, we're able te handle more complex use cases, as the object can more easily keep track of its own state than an array ever could.

Props jbrinley for the original architecture and design of this patch.
Props SergeyBiryukov, cheeserolls, Denis-de-Bernardy, leewillis77, wonderboymusic, nacin, jorbin, DrewAPicture, ocean90, dougwollison, khag7, pento, noplanman and aaroncampbell for their testing, suggestions, contributions, patch maintenance, cajoling and patience as we got through this.
Fixes #17817.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-08 03:55:31 +00:00
Aaron Jorbin a138374ec8 Bootstrap/Load: Include Plugin API via `require_once`
Currently, auto-prepended files need to directly modify the globals in order to add filters and actions. This is a bad idea. Globals are bad. You should never directly interact with the Plugin globals.

Fixes #37707.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38223 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-19 04:10:30 +00:00
Aaron Jorbin 7e14c27bb9 Bootstrap/Load: Revert Plugin Global restoration around `advance-cache.php`.
First added in [37588] and later modified in [38224], the idea was to ensure that filters/actions added before `advance-cache.php` would not disappear if `advance-cache.php` overloaded the filters/actions with code such as `$wp_filter = array()`. This is an edge case and one that there is no documented case of existing.

This restores the behavior from WordPress 4.5 and before. It is strongly encouraged that developers using `advance-cache.php` to use the Plugins API that is available before the loading of `advance-cache.php` rather than directly interacting with any of the globals.

Props azaozz, jorbin, dd32 for review, pento for review, westi for investigation, ipstenu for research.
See #36819.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-13 16:00:33 +00:00
Gary Pendergast 4ac3feaa64 Boostrap/Load: Improve forward compatiblity of plugin global backup methods.
[37588] added methods to backup the plugin globals, for ensuring that advanced cache drop-ins don't overwrite hooks that've been added earlier in the load process.

The method for restoring the plugin globals wasn't compatible with the implementation of `WP_Hook` in #17817. `WP_Hook` implements `ArrayAccess`, so `_restore_plugin_globals()` was treating it as an array, and inadvertantly overwriting the `WP_Hook` object with a plain array.

To avoid having to re-write this code as part of #17817, we now use `add_filter()` to restore any hooks that were added by cache drop-ins, which `WP_Hook` correctly supports.

Props pento, jorbin.
See #36819.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38164 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-09 01:45:29 +00:00
Drew Jaynes e6267dcf19 Docs: Fix formatting, tense, verb conjugation, and other syntax for wp-includes/* elements introduced or changed in 4.6.
Part 2/2.

Fixes #37318.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-20 19:33:30 +00:00
Drew Jaynes d8a6dee52c Docs: Update a cross-reference in the DocBlock for `wp_register_plugin_realpath()` from `plugin_basename()` to `wp_normalize_path()`.
Props zuige.
Fixes #37357.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-13 19:22:28 +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
Dominik Schilling dc994f5db5 Plugins: In `plugin_basename()` sort plugin paths before resolving symlinks.
`arsort()` sorts the paths reverse-alphabetically while preserving the keys. It results in a longer path being listed before a shorter one with the same base directory(ies).

Props jdgrimes, ocean90.
Fixes #28441.
Built from https://develop.svn.wordpress.org/trunk@37983


git-svn-id: http://core.svn.wordpress.org/trunk@37924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-06 09:45:27 +00:00
Dominik Schilling e210ea830b Plugins: Return the original value in `apply_filters_deprecated()` if no filter is registered for the tag.
Props flixos90.
Fixes #10441.
Built from https://develop.svn.wordpress.org/trunk@37911


git-svn-id: http://core.svn.wordpress.org/trunk@37852 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-29 13:22:27 +00:00
Jeremy Felt 6f3f00ea97 Multisite: Change `WP_Network` `id` property to an integer.
For consistency and developer sanity.

Props flixos90.
Fixes #37050.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-26 14:26:29 +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
Aaron Jorbin 95cbf8922b Bootstrap/Load: Load plugin.php earlier in wp-settings.php
In order to allow non-web initializations of WordPress (such as through wp-cli) to modify things like the check for maintenance mode, plugins.php and the associated functions must be available much earlier. The use of these functions earlier than the loading of plugins is not recommended in most use cases.

Fixes #36819. See #34936.
Props jorbin, danielbachhuber for documentation.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-27 19:20:29 +00:00
Drew Jaynes fe3b007fdd Docs: Remove inline `@see` tags from function, class, and method references in inline docs.
Known functions, classes, and methods are now auto-linked in Code Reference pages following #meta1483.

Note: Hook references are still linked via inline `@see` tags due to the unlikelihood of reliably matching for known hooks based on a RegEx pattern.

See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-02 04:00:28 +00:00
Dominik Schilling 4b51bc18cc Plugins: In `plugin_basename()` normalize the file path before unresolving symlinks.
`$wp_plugin_paths` contains normalized paths, see `wp_register_plugin_realpath()`.

Props jdgrimes, voldemortensen, flyingdr, ocean90.
Fixes #29154.
Built from https://develop.svn.wordpress.org/trunk@37332


git-svn-id: http://core.svn.wordpress.org/trunk@37298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-30 15:09:27 +00:00
Dominik Schilling f3c20d5011 Docs: Fix indentation in `add_filter()` example.
See #32246.
Built from https://develop.svn.wordpress.org/trunk@36392


git-svn-id: http://core.svn.wordpress.org/trunk@36359 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-25 18:58:27 +00:00
John Blackbourn 7e43e20436 Docs: `@see != @since`.
See #32246

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


git-svn-id: http://core.svn.wordpress.org/trunk@36038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-23 07:13:26 +00:00
John Blackbourn c2248060fe Add missing variadic markers to the optional parameters of `do_action()` and `apply_filters()`.
See #32246

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


git-svn-id: http://core.svn.wordpress.org/trunk@35876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-14 02:36:25 +00:00