Commit Graph

23288 Commits

Author SHA1 Message Date
Lance Willett
9e8bcc8bcd Twenty Fourteen: let authors customize the green "accent" color by changing to a different hex value in the Customizer. Props celloexpressions.
Also add an ID attribute to all `style` elements.

See #25220.

git-svn-id: https://develop.svn.wordpress.org/trunk@25418 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 22:05:06 +00:00
Lance Willett
4585c81b37 Twenty Fourteen: prefix Genericons enqueue handle so that the theme uses the its own version of the font CSS. Fixes a few display issues when plugins like Jetpack enqueue a different version of Genericons. See #25085.
git-svn-id: https://develop.svn.wordpress.org/trunk@25417 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 21:44:49 +00:00
Andrew Nacin
bb2908d613 Clear all transients (regardless of expiration) on all database upgrades. see #20316.
git-svn-id: https://develop.svn.wordpress.org/trunk@25416 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 21:13:18 +00:00
Andrew Nacin
9d9a28b3e0 Test framework: Update path to multisite.xml.
props jeremyfelt.
fixes #25242.


git-svn-id: https://develop.svn.wordpress.org/trunk@25415 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 21:04:16 +00:00
Andrew Nacin
8917f2b3bd Add populate_network_meta filter to populate_network().
props jeremyfelt.
fixes #25020.


git-svn-id: https://develop.svn.wordpress.org/trunk@25414 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 20:48:20 +00:00
Andrew Nacin
3631b81545 Fix comma placement in [25179].
props gradyetc.
see #15004, fixes #25298.


git-svn-id: https://develop.svn.wordpress.org/trunk@25413 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 20:15:30 +00:00
Helen Hou-Sandi
91d14be2e2 No space between // and duplicate_hook. see #25229
git-svn-id: https://develop.svn.wordpress.org/trunk@25412 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 18:56:32 +00:00
Helen Hou-Sandi
67633ef09e Inline docs for hooks in wp-admin/options-writing.php. props siobhyb. see #25229.
git-svn-id: https://develop.svn.wordpress.org/trunk@25411 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 18:52:38 +00:00
Helen Hou-Sandi
f72bc15544 Inline docs for hooks in wp-includes/nav-menu-template.php. props Faison. see #25229.
git-svn-id: https://develop.svn.wordpress.org/trunk@25410 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 18:47:27 +00:00
Andrew Nacin
4c8f1e263a Use @expectedDeprecated. see #25282, [25408].
git-svn-id: https://develop.svn.wordpress.org/trunk@25409 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 18:37:32 +00:00
Andrew Nacin
d5d476974e Test framework: Introduce the annotation @expectedDeprecated, modeled after PHPUnit's @expectedException.
It works for both functions and arguments (using the value of the first argument passed to _deprecated_function() or _deprecated_argument(), which is typically the function name). It asserts both ways:
 * If specified, those deprecated notices must be caught, or the test fails.
 * If not specified, any other deprecated notices cause the test to fail.

Works regardless of WP_DEBUG.
see #25282.


git-svn-id: https://develop.svn.wordpress.org/trunk@25408 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 18:37:00 +00:00
Andrew Nacin
9bfe9b7230 Revert [25405] and use a file that does exist. see #25282.
git-svn-id: https://develop.svn.wordpress.org/trunk@25407 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 17:47:40 +00:00
Lance Willett
e89c725696 Twenty Fourteen: fix comment for twentyfourteen_excerpt_length(), props SergeyBiryukov. Fixes #25297.
git-svn-id: https://develop.svn.wordpress.org/trunk@25406 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 17:43:23 +00:00
Scott Taylor
8a2c79d897 Fix the failing l10n assertions:
* Check if the file exists before running `true` assertions
* If the file doesn't exist, run `false` assertions

See #25282.



git-svn-id: https://develop.svn.wordpress.org/trunk@25405 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 17:36:45 +00:00
Scott Taylor
404fd85586 Fix the failing Tests_Link::test_wp_get_shortlink() assertion:
* `wp_get_shortlink()` was firing a notice when reading `$post->ID` while `$post` was null in some cases
* Before the assertions that assume `$GLOBALS['post']` is not set, call `unset( $GLOBALS['post'] );` - there was global spillage from other tests

See #25282.




git-svn-id: https://develop.svn.wordpress.org/trunk@25404 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 17:30:01 +00:00
Helen Hou-Sandi
435c2b5686 Add file size to attachment publish meta box. props desrosj. fixes #25170.
git-svn-id: https://develop.svn.wordpress.org/trunk@25403 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 15:09:35 +00:00
Scott Taylor
654d07ebf9 There was way too much duplicated code in my notice cleanup, it built up over time, and there's definitely a need to standardize.
* Remove duplicated code for deprecated function notice suppression
* Add support in `WP_UnitTestCase` setUp/tearDown methods for `$deprecated_functions` fixture if the extending class has added it
* Add a `$deprecated_functions` fixture to each extending class that needs it

To use this fixture, add something to your Test Case class like so:
`protected $deprecated_functions = array( 'get_theme', 'get_themes', 'get_theme_data', 'get_current_theme' );`

See #25282.



git-svn-id: https://develop.svn.wordpress.org/trunk@25402 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 14:47:58 +00:00
Andrew Nacin
1851da1382 Return false from wp_get_original_referer() if it is called before wp_validate_redirect() is defined.
see #25294.


git-svn-id: https://develop.svn.wordpress.org/trunk@25400 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 13:35:35 +00:00
Andrew Nacin
cc5477c7d9 Return false from wp_get_referer() if it is called before wp_validate_redirect() is defined.
see #25294.


git-svn-id: https://develop.svn.wordpress.org/trunk@25399 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 13:32:41 +00:00
Scott Taylor
3ae18e68ff * Fill in undefined var in Tests_Option_BlogOption
* Add `defined()` check for `BLOGSUPLOADDIR`
* Suppress deprecated function notices for `is_blog_user()` and `get_dashboard_blog()`
* Check existence of `$user` in `wpmu_log_new_registrations()` before arbitrarily making a database query

Fixes all notices in multisite unit tests.

See #25282.



git-svn-id: https://develop.svn.wordpress.org/trunk@25397 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 07:16:30 +00:00
Dion Hulse
cccac649d5 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
git-svn-id: https://develop.svn.wordpress.org/trunk@25396 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 06:56:20 +00:00
Scott Taylor
285db00ed4 Suppress Non-static method PO::*() should not be called statically, assuming $this from incompatible context by using the @ silencer in tests/pomo/po.php
See #25282.



git-svn-id: https://develop.svn.wordpress.org/trunk@25395 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 06:46:35 +00:00
Scott Taylor
13381bfcdc * sort() returns a boolean, not a sorted set. Move the calls out of the assertions and fix the test methods.
* Fix instances where `Only variables should be passed by reference` was being triggered by assigning `array_keys()` return value to a var

See #25282.



git-svn-id: https://develop.svn.wordpress.org/trunk@25394 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 06:41:36 +00:00
Scott Taylor
d58aace6f7 Avoid undefined variable notice - wp_insert_user() expects user_pass to be passed to it.
See #25282.



git-svn-id: https://develop.svn.wordpress.org/trunk@25393 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 06:28:25 +00:00
Scott Taylor
d1d5bcf036 * Add isset() checks all over WP_User_Query::prepare_query() and WP_User_Query::query(). When a WP_User_Query instance is constructed without passing args, no query vars are filled in, thus $qv doesn't contain most of the expected indices.
* Suppress an undefined index notice in `tests/user/query.php`

Fixes #25292.
See #25282.



git-svn-id: https://develop.svn.wordpress.org/trunk@25392 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 06:24:09 +00:00
Scott Taylor
c0c3359572 * Suppress deprecated function notice for set_current_user()
* Add assertions for `wp_set_current_user()`

See #25282.



git-svn-id: https://develop.svn.wordpress.org/trunk@25391 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 06:06:07 +00:00
Scott Taylor
b18d047edd * Avoid Only variables should be passed by reference notice by passing a var to array_pop() in tests/user.php
* Suppress a notice by silencing the passing of a non-existent object prop

See #25282.



git-svn-id: https://develop.svn.wordpress.org/trunk@25390 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 05:56:59 +00:00
Scott Taylor
6acb4cf24d Don't assume $GLOBALS['post'] is set in tests/url.php.
See #25282.



git-svn-id: https://develop.svn.wordpress.org/trunk@25389 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 05:52:53 +00:00
Scott Taylor
f4ac65db2d * Suppress deprecated function notices in tests/theme/themeDir.php
* Set `$theme['Template Files']` and `$theme['Stylesheet Files']` to a variable before calling array methods upon them - avoids `Indirect modification of overloaded element has no effect` notice
* Clean up setUp/tearDown in `tests/theme.php`

See #25282.



git-svn-id: https://develop.svn.wordpress.org/trunk@25388 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 05:48:58 +00:00
Scott Taylor
ee35baae6b Suppress the _doing_it_wrong notices when calling add_theme_support( 'html5' ) in tests/theme/support.php
See #25282.



git-svn-id: https://develop.svn.wordpress.org/trunk@25387 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 05:39:45 +00:00
Scott Taylor
c5c88eb85b Add sanity checks to get_*_template() functions to ensure that the return value of get_queried_object() is compatible with the assumed context.
Fixes #25291.
See #25282.



git-svn-id: https://develop.svn.wordpress.org/trunk@25386 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 05:31:14 +00:00
Dion Hulse
66aa532da5 When the WordPress files are in a subdirectory, correctly redirect the user to the setup-config.php page from the parent directories index.php. Fixes #24480
git-svn-id: https://develop.svn.wordpress.org/trunk@25385 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 05:12:51 +00:00
Scott Taylor
f9877147f6 Use reset() to access the first element of an array, don't assume there is an item at index 0.
See #25282.



git-svn-id: https://develop.svn.wordpress.org/trunk@25384 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 05:08:33 +00:00
Scott Taylor
6ced366e7c Add a post_id fixture in test/meta/slashes.php so Undefined variable: comment_post_ID notices don't fire when creating comments.
See #25282.



git-svn-id: https://develop.svn.wordpress.org/trunk@25383 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 04:59:29 +00:00
Scott Taylor
9cb4234c3f * Fix the horrendous whitespace in tests/media.php
* Suppress the deprecated function notice for `wp_convert_bytes_to_hr()`
* Add assertions for `size_format()`

See #25282.




git-svn-id: https://develop.svn.wordpress.org/trunk@25382 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 04:55:24 +00:00
Scott Taylor
1e460fd6e2 Avoid a notice and clean up setting/unsetting of globals by moving them into setUp() and tearDown() methods in Tests_Mail.
See #25282.



git-svn-id: https://develop.svn.wordpress.org/trunk@25381 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 04:46:49 +00:00
Scott Taylor
a76e6cef7d * Avoid notice by making WP_Image_Editor_Mock::test() compatible with WP_Image_Editor::test().
* Suppress deprecated function notice for `wp_load_image()`.
* Add assertion for `wp_get_image_editor()`.

See #25282.




git-svn-id: https://develop.svn.wordpress.org/trunk@25380 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 04:40:13 +00:00
Scott Taylor
dc35c8d11e Pass a variable that actually exists to seems_utf8() in tests/formatting/SeemsUtf8.php
See #25282.



git-svn-id: https://develop.svn.wordpress.org/trunk@25379 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 04:28:34 +00:00
Scott Taylor
7001aeaa11 Suppress the deprecated function notice in tests/formatting/CleanPre.php
See #25282.



git-svn-id: https://develop.svn.wordpress.org/trunk@25378 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 04:20:48 +00:00
Scott Taylor
691e3f25a0 Fix the PHP 5.4 Only variables should be passed by reference notices in tests/filters.php.
See #25282.



git-svn-id: https://develop.svn.wordpress.org/trunk@25377 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 04:16:59 +00:00
Scott Taylor
62b7214706 Avoid an undefined index error in tests/phpunit/tests/dependencies/styles.php
See #25282.



git-svn-id: https://develop.svn.wordpress.org/trunk@25376 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 04:13:11 +00:00
Scott Taylor
148d8e1e29 Suppress the doing_it_wrong notice from firing in tests/phpunit/tests/dependencies/jquery.php` when running in debug mode.
See #25282.



git-svn-id: https://develop.svn.wordpress.org/trunk@25375 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 04:08:03 +00:00
Scott Taylor
591a96743e Passing non-existent object properties to WP_UnitTestCase::assertNull() produces notices, opt instead for WP_UnitTestCase::assertTrue( empty( $obj->prop ) ) in tests/db.php.
See #25282.



git-svn-id: https://develop.svn.wordpress.org/trunk@25374 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 04:01:34 +00:00
Scott Taylor
85881c19dc Fix the PHP 5.4 Only variables should be passed by reference notices in tests/action.php.
See #25282.



git-svn-id: https://develop.svn.wordpress.org/trunk@25373 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 03:53:56 +00:00
Sergey Biryukov
1b012770eb Inline documentation for hooks in wp-admin/options.php.
props siobhyb.
see #25229.

git-svn-id: https://develop.svn.wordpress.org/trunk@25372 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 03:43:48 +00:00
Helen Hou-Sandi
f1ef5c0e23 Indicate that the fall-through in is_serialized() is deliberate. fixes #24023.
git-svn-id: https://develop.svn.wordpress.org/trunk@25371 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 03:40:25 +00:00
Sergey Biryukov
a56e83373d Consistently call skin methods in WP_Upgrader. fixes #25254.
git-svn-id: https://develop.svn.wordpress.org/trunk@25370 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 02:42:10 +00:00
Sergey Biryukov
c05412b16c Fix invalid markup when searching for installed themes. fixes #25288.
git-svn-id: https://develop.svn.wordpress.org/trunk@25369 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 00:03:01 +00:00
Scott Taylor
f97a98011b Pass $args as an array, rather than a splat, to wp_clear_scheduled_hook(). There are comments in the code describing the deprecated argument behavior.
See #25282.



git-svn-id: https://develop.svn.wordpress.org/trunk@25368 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-11 22:21:43 +00:00
Scott Taylor
a3a7be77e3 Suppress deprecated notices for wp_shrink_dimensions().
See #25282.



git-svn-id: https://develop.svn.wordpress.org/trunk@25367 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-11 22:16:43 +00:00