Commit Graph

98 Commits

Author SHA1 Message Date
Scott Taylor
0ba1025d66 Add missing doc blocks to load.php
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-26 18:53:27 +00:00
Andrew Nacin
116d1d354e Add useremail and userslugs as global cache groups. fixes #31243.
Built from https://develop.svn.wordpress.org/trunk@31347


git-svn-id: http://core.svn.wordpress.org/trunk@31328 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-06 03:24:23 +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
786caa4d55 Correct the @param docs for arguments that are truthy/falsey.
See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-20 23:04:23 +00:00
Dominik Schilling
47f89b1d91 Remove unbounded check for "install.php" in wp_not_installed().
The check is true for `wp-admin/plugin-install.php` and `wp-admin/theme-install.php` too. This will end in a redirect to `/wp-admin/upgrade.php` or a screen with a bunch of errors.
The `WP_INSTALLING` constant was added in WordPress 1.5.1 to `wp-admin/install.php` which makes the check for "install.php" redundant.

props joemcgill.
fixes #29694.
Built from https://develop.svn.wordpress.org/trunk@30581


git-svn-id: http://core.svn.wordpress.org/trunk@30571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-26 20:56:23 +00:00
Sergey Biryukov
fa8e82efab Send nocache_headers() on installation screens and when redirecting to them.
fixes #29248.
Built from https://develop.svn.wordpress.org/trunk@29599


git-svn-id: http://core.svn.wordpress.org/trunk@29373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-25 17:40:16 +00:00
Drew Jaynes
18a6253747 Improve inline documentation for wp-includes/load.php.
Props ericlewis, DrewAPicture.
Fixes #24886.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-04 04:12:17 +00:00
Andrew Nacin
88e3ebe05b Revert the conversion of adjacent post queries to WP_Query. Explanation on the ticket.
Reverts [27285], [27286], [27287], [27288], [27291], [27292], [27293], [27296], [27633], [27634], [27635], and [27692].

see #26937.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-29 06:03:15 +00:00
Andrew Nacin
2061a3aa5f Return a bool from wp_using_ext_object_cache(), never a null.
see #26937.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-20 02:55:14 +00:00
Andrew Nacin
a37d4609be Send a charset header when erroring out in wp_check_php_mysql_versions().
props rodrigosprimo.
fixes #26536.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-15 06:17:14 +00:00
Drew Jaynes
c01c33a6aa Inline documentation fixes for timer_stop().
See #26874.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-01 02:42:14 +00:00
John Blackbourn
50c240d4d0 Correct the inline docs for timer_stop(). Fixes #26874. Props jackreichert
Built from https://develop.svn.wordpress.org/trunk@27332


git-svn-id: http://core.svn.wordpress.org/trunk@27184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-28 22:18:14 +00:00
Andrew Nacin
c51ce41c59 Use mysqli for WordPress development versions, regardless of PHP version, to increase testing footprint.
Allow the lack of ext/mysql to pass wp_check_php_mysql_versions().

see #21663.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-25 15:53:13 +00:00
Sergey Biryukov
1de240d5a2 Inline documentation for hooks in wp-includes/load.php.
props mordauk.
see #25229.
Built from https://develop.svn.wordpress.org/trunk@25455


git-svn-id: http://core.svn.wordpress.org/trunk@25376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-16 18:30:10 +00:00
Dion Hulse
641d3b2560 Fix wp_guess_url() to work in every scenario I could find, allows us to use it to determine the correct path to the WordPress Site URL before installation for install.php and setup-config.php redirects. Fixes #24480 Fixes #16884
Built from https://develop.svn.wordpress.org/trunk@25396


git-svn-id: http://core.svn.wordpress.org/trunk@25327 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-12 06:57:09 +00:00
Scott Taylor
d7cc1f506a Introduce wp_using_ext_object_cache() - mimic wp_suspend_cache_invalidation() and discourage direct access to $_wp_using_ext_object_cache, cleaning up importing of globals in functions and provides function to modify that global. Loads the packaged object cache when an external cache hasn't been loaded or doesn't contain wp_cache_init().
Fixes #21401.


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


git-svn-id: http://core.svn.wordpress.org/trunk@25253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-06 18:10:09 +00:00
Andrew Nacin
cbfc7470e2 Documentation for [24564]. see #23811.
git-svn-id: http://core.svn.wordpress.org/trunk@24581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-08 12:59:10 +00:00
Mark Jaquith
a62e681239 Don't display errors for XML-RPC requests, as they malform the response.
fixes #23811. props kovshenin, markoheijnen.

git-svn-id: http://core.svn.wordpress.org/trunk@24564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-05 17:38:14 +00:00
Andrew Nacin
316bfc63a2 When WP_DEBUG, set PHP error_reporting level to E_ALL. This will include E_DEPRECATED in PHP 5.3, and E_STRICT in PHP 5.4.
fixes #24357.



git-svn-id: http://core.svn.wordpress.org/trunk@24288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-17 20:44:54 +00:00
Mark Jaquith
b2d13224ec No longer need to work around zend_hash_del_key_or_index bug. fixes #24029. see [4717]
git-svn-id: http://core.svn.wordpress.org/trunk@23947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-10 07:57:58 +00:00
Andrew Nacin
2cb5fccd5c Ensure we have a charset before calling mb_internal_encoding(), avoiding an unnecessary (if suppressed) warning. props dfavor. fixes #23093.
git-svn-id: http://core.svn.wordpress.org/trunk@23373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-02 02:01:29 +00:00
Ryan Boren
9fc9d42d0a * Register blog-id-cache group as global
* Introduce clean_blog_cache() so we can run it independently of refresh_blog_details() which assumes the blog still exists and get_blog_details() can be called.
* Don't db escape cache keys in get_blog_id_from_url()
* prepare() the query in get_blog_id_from_url()
* Return 0 for all failures in get_blog_id_from_url()
* clean_blog_cache() after dropping tables in wpmu_delete_blog() to make sure the cache is for real cleaned.



git-svn-id: http://core.svn.wordpress.org/trunk@22092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-01 18:03:23 +00:00
Andrew Nacin
a42ce2353a Stop cleaning the cache of a post's children. Ancestors are no longer cached against the post object, which means this kind of walking is unnecessary. It is also prohibitively expensive with large hierarchies.
We need to remove post_ancestors non-persistent caching for this. get_post_ancestors() can simply rely on the caching of get_post() instead. Previously, it was a direct query, hence the extra layers of caching and clearing.

Child cache clearing stays in wp_delete_post() as children get a new parent.

fixes #11399.



git-svn-id: http://core.svn.wordpress.org/trunk@21952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-22 15:55:02 +00:00
Andrew Nacin
c97452d955 Don't include functions.php in wp_load_translations_early()
to avoid a parse error in a PHP4 environment (caused by use of
the clone keyword in option.php).

Manually include functions.php in the rare situations where it
is not already included by the time we need to load translations
early.

Remove the functions.php dependency by switching the wp_die() calls
to die(), in wp_check_php_mysql_versions().

props SergeyBiryukov, see #21316, for trunk.




git-svn-id: http://core.svn.wordpress.org/trunk@21715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-04 02:38:37 +00:00
Ryan Boren
37a631387c s/blog/site/. see #21742
git-svn-id: http://core.svn.wordpress.org/trunk@21693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-31 20:45:28 +00:00
Ryan Boren
f0c8b8d0e7 Introduce WP_Screen::in_admin() for determining which admin the screen is in.
Change is_*_admin() to reference in_admin() with fallback to the WP_*_ADMIN constants during early bootstrap. This allows unit tests and ajax handlers to set the admin context.

fixes #21742


git-svn-id: http://core.svn.wordpress.org/trunk@21687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-31 17:16:46 +00:00
Ryan Boren
9377523bce Introduce WP_Post class. Clean up ancestors handling. Props scribu, toppa. fixes #10381 see #21309
git-svn-id: http://core.svn.wordpress.org/trunk@21559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-20 19:47:52 +00:00
ryan
14ecba530b Move get_current_blog_id() to load.php so it is available during multisite bootstrap. fixes #21432
git-svn-id: http://core.svn.wordpress.org/trunk@21484 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-09 13:17:14 +00:00
ryan
295ca4d76f Introduce wp_cache_switch_to_blog() and WP_Object_Cache::switch_to_blog() as a lighter/faster way to switch the cache to a new blog id.
Add the blog id to the cache keys for multisite installs.

Use wp_cache_switch_to_blog() instead of wp_cache_init() in switch_to_blog().

Use wp_cache_switch_to_blog() instead of wp_cache_reset() in wp_start_object_cache().

Deprecate wp_cache_reset().

This avoids the many queries needed to re-prime the cache after switch_to_blog() on multisite installs using the default cache backend.

fixes #21434



git-svn-id: http://core.svn.wordpress.org/trunk@21403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-02 18:31:14 +00:00
ryan
09d728e46b Take the mmm out of comment_ID. Just mm is sufficient.
Props wonderboymusic
fixes #21400


git-svn-id: http://core.svn.wordpress.org/trunk@21363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-30 16:16:13 +00:00
nacin
81bb2f7ed7 Use is_rtl() for html direction when possible. In sites.php, language_attributes() will always exist (MU vestige). When the DB is dead, language_attributes() is worse than a simple is_rtl() check. is_rtl() exists here due to wp_load_translations_early(). see #18180.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-08 06:05:35 +00:00
nacin
1d5e72a39c Do RTL detection based on a translated string, rather than a hardcoded list. Makes things a bit cleaner. fixes #19924, fixes #19600.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-06 19:36:24 +00:00
nacin
ce311c1035 Load admin-$locale.mo in setup-config.php. see #19852, see #18180.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-29 20:49:34 +00:00
nacin
81ed9a7563 Introduce wp_load_translations_early(), which can be used before the locale is properly loaded in order to translate early error strings. Internationalize setup-config.php -- translators no longer have a reason to modify this file. fixes #18180.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-26 20:34:27 +00:00
ryan
e3b46b25d3 Lose EOF ?>. Clean up EOF newlines. fixes #12307
git-svn-id: http://svn.automattic.com/wordpress/trunk@19712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-08 17:01:11 +00:00
dd32
9a4be393ec Revert Debug cruft from [19679], See #19249
git-svn-id: http://svn.automattic.com/wordpress/trunk@19681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-05 07:43:40 +00:00
ryan
fd1393ab7a Clear strict notices for the walkers. fixes #19249
git-svn-id: http://svn.automattic.com/wordpress/trunk@19679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-04 23:03:46 +00:00
nacin
6424c5b733 Ask for a float from microtime() for timer_start(), timer_stop(). Clarify docs. props solarissmoke, fixes #19157.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-20 21:36:53 +00:00
ryan
07ff8b216b Use one space, not two, after trailing punctuation. fixes #19537
git-svn-id: http://svn.automattic.com/wordpress/trunk@19593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-13 23:45:31 +00:00
ryan
32e25b6aec phpdoc typo and readability fixes. Props SergeyBiryukov. fixes #18560
git-svn-id: http://svn.automattic.com/wordpress/trunk@18827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-29 22:57:43 +00:00
nacin
50f5ad2216 Force display_errors to off when WP_DEBUG_DISPLAY == false. Technically a backwards incompatible change - if you want the passthrough to php.ini (which false used to provide) then use WP_DEBUG_DISPLAY === null. see #18391.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-08-13 18:59:05 +00:00
azaozz
5256d7951f <!DOCTYPE html> for all, fixes #18202
git-svn-id: http://svn.automattic.com/wordpress/trunk@18460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-07-22 00:25:41 +00:00
nacin
db78833264 Mark a few files as needing to be parsable by PHP4 in order to show the proper error messages. Non-exhaustive. see #17934.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-06-29 16:50:07 +00:00
nacin
ad1e1df0f2 wp_check_php_mysql_versions() during setup and install. see #17934.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-06-29 16:46:46 +00:00
ryan
10823b5d77 Avoid PHP 4 parse error prior to version checks. Props dd32. see #17880
git-svn-id: http://svn.automattic.com/wordpress/trunk@18339 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-06-24 21:32:40 +00:00
nacin
4dcb9576c8 Avoid _deprecated_function() in wp_clone(). An object cache gets loaded before i18n functions exist. Maybe a better solution in 3.3. see #17206.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-06-12 20:36:47 +00:00
ryan
f9b418a2f9 Move wp_clone() back to load.php. Props technosailor. fixes #17206
git-svn-id: http://svn.automattic.com/wordpress/trunk@17681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-22 17:46:02 +00:00
nacin
1cdd5ad41a Remove more E_RECOVERABLE_ERROR checks. props duck_, see #16920.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-12 09:21:13 +00:00
ryan
e3895262ef Deprecate wp_clone(). Call clone directly. Props hakre. fixes #16813
git-svn-id: http://svn.automattic.com/wordpress/trunk@17613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-06 17:44:29 +00:00