Weston Ruter
10503cd3af
Customizer: Ensure persistence of unchanged `active` state for controls, sections, and panels.
...
Props nikeo, westonruter.
Fixes #33428 for trunk.
See also #33494 .
Built from https://develop.svn.wordpress.org/trunk@33754
git-svn-id: http://core.svn.wordpress.org/trunk@33722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-26 07:26:21 +00:00
Weston Ruter
a2d9547825
Customizer: Prevent JS error during init when `nav_menus` panel is removed by plugin.
...
Fixes #33411 for trunk.
Built from https://develop.svn.wordpress.org/trunk@33753
git-svn-id: http://core.svn.wordpress.org/trunk@33721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-26 06:43:22 +00:00
Scott Taylor
df1c0c2363
Roles: move classes into their own file. `capbilities.php` loads the new files, so this is 100% BC if someone is loading `capbilities.php` directly. New files created using `svn cp`.
...
Creates:
`class-wp-roles.php`
`class-wp-role.php`
`class-wp-user.php`
`capbilities-functions.php`
`capbilities.php` contains only top-level code. Class files only contains classes. Functions file only contains functions.
See #33413 .
Built from https://develop.svn.wordpress.org/trunk@33752
git-svn-id: http://core.svn.wordpress.org/trunk@33720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-26 04:58:21 +00:00
Scott Taylor
207abc77e1
Rewrite: move `WP_Rewrite` into its own file. `rewrite.php` loads the new files, so this is 100% BC if someone is loading `rewrite.php` directly. New files created using `svn cp`.
...
The rewrite functions have all kinds of cross-dependencies (like `WP_Query`), so loading the file by itself would have been bizarre (and still is).
Creates:
`rewrite-constants.php`
`rewrite-functions.php`
`class-wp-rewrite.php`
`rewrite.php` contains only top-level code. Class file only contains the class. Functions file only contains functions.
See #33413 .
Built from https://develop.svn.wordpress.org/trunk@33751
git-svn-id: http://core.svn.wordpress.org/trunk@33719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-26 04:42:20 +00:00
Scott Taylor
f07ab12359
Comments: move `WP_Comment_Query` into its own file. `comment.php` loads the new files, so this is 100% BC if someone is loading `comment.php` directly. New files created using `svn cp`.
...
Creates:
`class-wp-comment-query.php`
`comment-functions.php`
`comment.php` contains only top-level code. Class file only contains the class. Functions file only contains functions.
See #33413 .
Built from https://develop.svn.wordpress.org/trunk@33750
git-svn-id: http://core.svn.wordpress.org/trunk@33718 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-26 04:27:21 +00:00
Scott Taylor
484331e492
Users: move `WP_User_Query` into its own file. `user.php` loads the new files, so this is 100% BC if someone is loading `user.php` directly (a lot of plugins do). New files created using `svn cp`.
...
Creates:
`class-wp-user-query.php`
`user-functions.php`
`user.php` contains only top-level code. Class file only contains the class. Functions file only contains functions.
See #33413 .
Built from https://develop.svn.wordpress.org/trunk@33749
git-svn-id: http://core.svn.wordpress.org/trunk@33717 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-26 04:20:21 +00:00
Scott Taylor
7c8c216bec
HTTP: move classes into their own files, `http.php` loads the new files, so this is 100% BC if someone is loading `http.php` directly. New files created using `svn cp`.
...
`class-http.php` requires functions from `http.php`, so loading it by itself wouldn't have worked.
Creates:
`class-wp-http-cookie.php`
`class-wp-http-curl.php`
`class-wp-http-encoding.php`
`class-wp-http-proxy.php`
`class-wp-http-streams.php`
`http-functions.php`
`WP_Http` remains in `class-http.php`.
`http.php` contains only top-level code. Class files only contain classes. Functions file only contains functions.
See #33413 .
Built from https://develop.svn.wordpress.org/trunk@33748
git-svn-id: http://core.svn.wordpress.org/trunk@33716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-26 03:55:21 +00:00
Gary Pendergast
48e83418ed
When `wp_json_encode()` calls `json_encode()`, the latter will generate warnings if the string contains non-UTF-8 characters. No-one likes warnings, so we need to do something about that.
...
The good news is, the point of `wp_json_encode()` is to handle those non-UTF-8 characters. It'll totally just fix them up, no problem.
Anyway, we can just ignore those warnings.
Fixes #33524 .
Built from https://develop.svn.wordpress.org/trunk@33747
git-svn-id: http://core.svn.wordpress.org/trunk@33715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-26 03:26:21 +00:00
Scott Taylor
c3565b2cba
Widgets: move classes into their own files, `widgets.php` loads the new files, so this is 100% BC if someone is loading `widgets.php` directly. New files created using `svn cp`.
...
Creates:
`class-wp-widget.php`
`class-wp-widget-factory.php`
`widget-functions.php`
`widgets.php` contains only top-level code. Class files only contain classes. Functions file only contains functions.
See #33413 .
Built from https://develop.svn.wordpress.org/trunk@33746
git-svn-id: http://core.svn.wordpress.org/trunk@33714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-26 02:40:23 +00:00
Sergey Biryukov
a6ea3624ef
Add oEmbed support for ReverbNation.
...
props rhubbardreverb.
fixes #33207 .
Built from https://develop.svn.wordpress.org/trunk@33745
git-svn-id: http://core.svn.wordpress.org/trunk@33713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-26 00:29:21 +00:00
Sergey Biryukov
1f4ae40c03
Add `'wp_verify_nonce_failed'` action that fires when nonce verification fails.
...
props johnbillion, garza, Shelob9.
fixes #24030 .
Built from https://develop.svn.wordpress.org/trunk@33744
git-svn-id: http://core.svn.wordpress.org/trunk@33712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-26 00:06:21 +00:00
Sergey Biryukov
b34af5586a
Fire the `check_ajax_referer` action on failure as well as success.
...
See [33017] for `check_admin_referer`.
props egill.
fixes #33342 .
Built from https://develop.svn.wordpress.org/trunk@33743
git-svn-id: http://core.svn.wordpress.org/trunk@33711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-25 23:25:21 +00:00
Sergey Biryukov
d75453cc7c
Remove rounded corners from "Choose from the most used tags" result in Tags meta box.
...
props tyxla.
fixes #31560 .
Built from https://develop.svn.wordpress.org/trunk@33742
git-svn-id: http://core.svn.wordpress.org/trunk@33710 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-25 23:14:21 +00:00
Sergey Biryukov
b4a5dd59f3
Customizer: Use existing decoupled strings in Menu Locations section. See [31941] and [31951].
...
props egill.
fixes #33416 .
Built from https://develop.svn.wordpress.org/trunk@33741
git-svn-id: http://core.svn.wordpress.org/trunk@33709 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-25 21:53:20 +00:00
Scott Taylor
b68886efb4
Add some more data for Shortcode unit tests.
...
Props miqrogroove.
Fixes #33455 .
Built from https://develop.svn.wordpress.org/trunk@33740
git-svn-id: http://core.svn.wordpress.org/trunk@33708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-25 21:51:22 +00:00
Scott Taylor
8d27055b0c
Allow these CSS properties in KSES: `min-height', 'max-height', 'min-width', 'max-width'`
...
Props MikeHansenMe.
Fixes #31949 .
Built from https://develop.svn.wordpress.org/trunk@33739
git-svn-id: http://core.svn.wordpress.org/trunk@33707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-25 21:46:20 +00:00
Scott Taylor
a13230b93f
Pass option name to option and transient filters with dynamic names.
...
Props Viper007Bond, SergeyBiryukov, MikeHansenMe.
Fixes #28402 .
Built from https://develop.svn.wordpress.org/trunk@33738
git-svn-id: http://core.svn.wordpress.org/trunk@33706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-25 21:42:20 +00:00
Scott Taylor
8913ea39f2
After [33698], wrap the time constants in a DocBlock template.
...
Props egill.
Fixes #33397 .
Built from https://develop.svn.wordpress.org/trunk@33737
git-svn-id: http://core.svn.wordpress.org/trunk@33705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-25 21:21:21 +00:00
Scott Taylor
d8752c191d
In `get_home_url()`, import the `$pagenow` global to avoid having to check if it exists before comparing against it.
...
Props KalenJohnson.
See #33545 .
Built from https://develop.svn.wordpress.org/trunk@33736
git-svn-id: http://core.svn.wordpress.org/trunk@33704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-25 21:03:20 +00:00
Scott Taylor
93f745fd9b
In `WP_Users_List_Table::single_row()`, `$actions` is not always set before being used.
...
See #33491 .
Built from https://develop.svn.wordpress.org/trunk@33735
git-svn-id: http://core.svn.wordpress.org/trunk@33703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-25 20:38:20 +00:00
Scott Taylor
ef87172270
`foreach` is a statement, not a function.
...
See #33491 .
Built from https://develop.svn.wordpress.org/trunk@33734
git-svn-id: http://core.svn.wordpress.org/trunk@33702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-25 20:28:22 +00:00
Scott Taylor
c2a0336d22
Instead of [33713], allow `WP_Posts_List_Table::get_bulk_actions()` to check `edit_posts` AND `delete_posts`.
...
Props DeBAAT.
Fixes #29789 .
Built from https://develop.svn.wordpress.org/trunk@33733
git-svn-id: http://core.svn.wordpress.org/trunk@33701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-25 20:12:22 +00:00
Sergey Biryukov
85d3345e05
Multisite: Add `'invite_user'` action that fires immediately after a user is invited to join a site, but before the notification is sent.
...
props ebinnion, MikeHansenMe, DrewAPicture.
fixes #33008 .
Built from https://develop.svn.wordpress.org/trunk@33732
git-svn-id: http://core.svn.wordpress.org/trunk@33700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-25 17:48:21 +00:00
Drew Jaynes
e8283a6f88
Docs: The type for the `$t_time` parameter in the `post_date_column_time` filter docs should be `string`, not `array`.
...
Props jjeaton
Fixes #33540 .
Built from https://develop.svn.wordpress.org/trunk@33731
git-svn-id: http://core.svn.wordpress.org/trunk@33699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-25 17:15:21 +00:00
Drew Jaynes
7aff9092c7
Docs: Document the default comment data arguments for `wp_new_comment()`.
...
Props rachelbaker, DrewAPicture
Fixes #32369 .
Built from https://develop.svn.wordpress.org/trunk@33730
git-svn-id: http://core.svn.wordpress.org/trunk@33698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-25 17:03:21 +00:00
Scott Taylor
767dd35a47
Media:
...
When inserting an image into a post, the values in `wp.media.controller.Library` should not default to linking the image when no user settings are present.
The default display setting value for `link` is now `none`. User settings persist and will override or confirm this value based on user actions.
Props liljimmi, janhenckens, eherman24, wonderboymusic.
Fixes #31467 .
Built from https://develop.svn.wordpress.org/trunk@33729
git-svn-id: http://core.svn.wordpress.org/trunk@33697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-25 12:13:23 +00:00
Andrew Ozz
25b0eedf2b
TinyMCE: ensure the `wordpress` plugin is loaded before calling `_createToolbar()`.
...
Props hauvong, azaozz. Fixes #33393 .
Built from https://develop.svn.wordpress.org/trunk@33728
git-svn-id: http://core.svn.wordpress.org/trunk@33696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-25 04:38:20 +00:00
Dion Hulse
4f8ce1c232
Term Splitting: Switch to a faster cron unschedule process to benefit sites with thousands of affected jobs. Fix the cron hook name in the failsafe rescheduler.
...
Props Otto42, dd32, peterwilsoncc
See #33423
Built from https://develop.svn.wordpress.org/trunk@33727
git-svn-id: http://core.svn.wordpress.org/trunk@33695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-25 04:32:21 +00:00
Gary Pendergast
0401ee6007
Build Tools: Update `grunt-contrib-uglify` to 0.9.2.
...
Fixes #33533 .
Built from https://develop.svn.wordpress.org/trunk@33726
git-svn-id: http://core.svn.wordpress.org/trunk@33694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-25 03:28:23 +00:00
Drew Jaynes
dbdc8bf149
Docs: Clarify the return description for `wp_create_user()` to illustrate that a `WP_Error` object will be returned on failure.
...
Props jmayhak
Fixes #33321 .
Built from https://develop.svn.wordpress.org/trunk@33725
git-svn-id: http://core.svn.wordpress.org/trunk@33693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-24 22:23:24 +00:00
Boone Gorges
8a95b13cab
In `WP_Query::parse_tax_query()`, allow 'cat' and 'tag' querystrings to be formatted as arrays.
...
See [33095] #32454 for a previous fix related to custom taxonomies.
Props Veraxus.
Fixes #33532 .
Built from https://develop.svn.wordpress.org/trunk@33724
git-svn-id: http://core.svn.wordpress.org/trunk@33691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-24 21:22:26 +00:00
Scott Taylor
21c61251a2
With a few modifications in `wp-admin/menu.php`, we can eliminate the extra logic for Post and Page menu registration. Instead, they can just declare `menu_position` on post type registration.
...
Props scribu, wonderboymusic.
Fixes #16865 .
Built from https://develop.svn.wordpress.org/trunk@33723
git-svn-id: http://core.svn.wordpress.org/trunk@33690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-24 21:19:24 +00:00
Scott Taylor
d345a6012c
`WP_Query`: add changelog for the `title` param after [33706]
...
Props dimadin.
Fixes #33074 .
Built from https://develop.svn.wordpress.org/trunk@33722
git-svn-id: http://core.svn.wordpress.org/trunk@33689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-24 20:10:26 +00:00
Drew Jaynes
d2517984e0
Docs: Improve pared formatting of the oEmbed providers tables by removing the unrecognized first and last rows in the hook docs for the `oembed_providers` filter.
...
See #32246 .
Built from https://develop.svn.wordpress.org/trunk@33720
git-svn-id: http://core.svn.wordpress.org/trunk@33687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-24 04:38:25 +00:00
Gary Pendergast
f2a248e16d
oEmbed: Remove blip.tv as an oEmbed provider, the service has been shut down.
...
Vale, blip.tv.
Fixes #33522 .
Props rabmalin.
Built from https://develop.svn.wordpress.org/trunk@33719
git-svn-id: http://core.svn.wordpress.org/trunk@33686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-24 04:12:25 +00:00
Gary Pendergast
eb99787e32
WPDB: `get_table_from_query()` didn't find table names with hyphens in them.
...
Props dustinbolton for the fix.
Fixes #33470 .
Built from https://develop.svn.wordpress.org/trunk@33718
git-svn-id: http://core.svn.wordpress.org/trunk@33685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-24 00:19:25 +00:00
Drew Jaynes
45578c525e
Docs: Add a description and example to the hook docs for the `navigation_markup_template` filter, introduced in [33714].
...
Since the value of the filter is passed through `sprintf()` it's important to note that any filtered output needs to contain the expected specifiers.
See #31315 .
Built from https://develop.svn.wordpress.org/trunk@33717
git-svn-id: http://core.svn.wordpress.org/trunk@33684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-23 18:08:25 +00:00
Drew Jaynes
5e32a0c646
Docs: Better clarify that the `$post_type` parameter for the `get_usernumposts` filter and `count_user_posts()` can accept either a single post type or array of post types.
...
Props tyxla
See #33481 . Fixes #33520 .
Built from https://develop.svn.wordpress.org/trunk@33716
git-svn-id: http://core.svn.wordpress.org/trunk@33683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-23 17:46:24 +00:00
Drew Jaynes
ea4f27f519
Docs: Add better documentation for all accepted values for the `fields` argument in `get_terms()`.
...
See #32246 .
Built from https://develop.svn.wordpress.org/trunk@33715
git-svn-id: http://core.svn.wordpress.org/trunk@33682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-23 17:40:24 +00:00
Scott Taylor
27b551ee50
Add a filter to `_navigation_markup`: 'navigation_markup_template'
...
Props joedolson, mordauk.
Fixes #31315 .
Built from https://develop.svn.wordpress.org/trunk@33714
git-svn-id: http://core.svn.wordpress.org/trunk@33681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-23 16:34:26 +00:00
Scott Taylor
b1c00f2653
Posts List Table:
...
Don't show bulk actions if the user can't edit posts.
Props DrewAPicture.
Fixes #29789 .
Built from https://develop.svn.wordpress.org/trunk@33713
git-svn-id: http://core.svn.wordpress.org/trunk@33680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-23 16:28:28 +00:00
Drew Jaynes
dffa53dca8
Docs: Fix a minor alignment issue in the DocBlock for `get_pagenum_link()`.
...
See #32246 .
Built from https://develop.svn.wordpress.org/trunk@33712
git-svn-id: http://core.svn.wordpress.org/trunk@33679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-23 07:19:27 +00:00
Boone Gorges
dc0e7671b0
In `wp_delete_term()`, the `$deleted_term` object passed to filters should be generated before term relationships are deleted.
...
This allows the `count` property to reflect the pre-delete state of affairs,
rather than always being 0.
Props nicholas_io.
Fixes #33485 .
Built from https://develop.svn.wordpress.org/trunk@33711
git-svn-id: http://core.svn.wordpress.org/trunk@33678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-22 19:43:26 +00:00
Boone Gorges
6ab7493b27
Pass the `$public_only` value to 'get_usernumposts' filter.
...
[32523] introduced the `$public_only` parameter to `count_user_posts()`. That
changeset was supposed to pass `$public_only` to the 'get_usernumposts' filter
at the end of the function, but only the documentation was modified, not the
filter itself.
This changeset also fixes an incorrect variable name in the docblock for
the same filter.
Props swisspidy, tmatsuur.
Fixes #33481 for trunk.
Built from https://develop.svn.wordpress.org/trunk@33710
git-svn-id: http://core.svn.wordpress.org/trunk@33677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-22 18:59:26 +00:00
Scott Taylor
20cc53b929
Add some JS Docs for Customizer.
...
Props ericlewis.
See #33503 .
Built from https://develop.svn.wordpress.org/trunk@33709
git-svn-id: http://core.svn.wordpress.org/trunk@33676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-22 17:24:25 +00:00
Scott Taylor
c192d90fa1
In `wp_insert_user()`, add a filter: `insert_user_meta`, to filter a user's meta values and keys before the user is created or updated.
...
Props tharsheblows, chriscct7, DrewAPicture.
Fixes #31549 .
Built from https://develop.svn.wordpress.org/trunk@33708
git-svn-id: http://core.svn.wordpress.org/trunk@33675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-22 17:12:25 +00:00
Scott Taylor
5510b519f5
In `wp_sanitize_redirect()`, don't eat `@` characters. According to RFC 3986, "@" is a perfectly valid character in a URL path or query string.
...
Adds unit test.
Props markjaquith.
Fixes #18818 .
Built from https://develop.svn.wordpress.org/trunk@33707
git-svn-id: http://core.svn.wordpress.org/trunk@33674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-22 17:05:24 +00:00
Scott Taylor
523b51a359
Query:
...
Add a query var, `title`, that allows you to query posts by `post_title`. To accomplish this now, you have to do something like:
{{{
$tacos = get_posts( [
'post_type' => 'taco',
's' => $name,
'exact' => true,
'sentence' => true,
'post_status' => 'publish',
'fields' => 'ids',
'posts_per_page' => 1
] );
}}}
Adds unit tests.
Fixes #33074 .
Built from https://develop.svn.wordpress.org/trunk@33706
git-svn-id: http://core.svn.wordpress.org/trunk@33673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-22 16:59:26 +00:00
Scott Taylor
42b6ac80e7
Ensure that `attachment_url_to_postid()` matches cross-scheme when front-end and back-end schemes are different.
...
Adds unit test.
Props welcher.
Fixes #33109 .
Built from https://develop.svn.wordpress.org/trunk@33705
git-svn-id: http://core.svn.wordpress.org/trunk@33672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-22 16:39:25 +00:00
Scott Taylor
f2a9cd365b
`update-core.php` help docs, update string to include translations: `themes, plugins, and translations`
...
Props netweb, DrewAPicture.
Fixes #28201 .
Built from https://develop.svn.wordpress.org/trunk@33704
git-svn-id: http://core.svn.wordpress.org/trunk@33671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-22 16:25:28 +00:00