Commit Graph

3594 Commits

Author SHA1 Message Date
Drew Jaynes
a521a4e7f6 Dashboard: Introduce the dashboard_recent_drafts_query_args filter, making it possible to manipulate the post query arguments used in the 'Recent Drafts' dashboard widget.
Props iamfriendly.
Fixes #8243.


git-svn-id: https://develop.svn.wordpress.org/trunk@35003 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-10 06:32:51 +00:00
Sergey Biryukov
fc9f0b229e Merge two database update strings for consistency.
Props pavelevap.
Fixes #33514.

git-svn-id: https://develop.svn.wordpress.org/trunk@35000 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-10 05:13:57 +00:00
Jeremy Felt
ecb75a16be MS: Show an error if a new site slug conflicts with an existing username.
Props utkarshpatel, dipesh.kakadiya.
Fixes #33804.


git-svn-id: https://develop.svn.wordpress.org/trunk@34996 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-10 01:41:43 +00:00
Sergey Biryukov
b374a081a9 Remove stray closing tag in wp-admin/themes.php.
Props tfrommen.
Fixes #34237.

git-svn-id: https://develop.svn.wordpress.org/trunk@34994 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-09 21:16:46 +00:00
Andrea Fercia
4b5f84295a Administration: Convert H5 usage in Screen Options to use fieldsets and legends.
These H5 (heading level 5) don't allow for a good headings hierarchy and shouldn't be headings in the first place. Each group of options has now its own fieldset and legend.
In `render_screen_options()`, introduce two new "render" methods: `render_meta_boxes_preferences()` and `render_list_table_columns_preferences()` for consistency with already existing render methods and cleaner code.

Props joedolson, afercia.
Fixes #33646.

git-svn-id: https://develop.svn.wordpress.org/trunk@34991 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-09 18:04:18 +00:00
Drew Jaynes
ccfda7703c Install: Match existing tonal style in setup-config.php by converting strings containing 'do not' and 'does not' to instead use contractions.
The 'do not' is converted to "don't" because "you" is third-person plural, and 'does not' is converted to "doesn't" because `localhost` is third-person singular. While both are "negative" contractions, we often write this way in WordPress to provide a friendlier tone. That's your English grammar lesson for the day.

Props ankit-k-gupta, iamfriendly.
Fixes #30317.


git-svn-id: https://develop.svn.wordpress.org/trunk@34987 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-09 15:42:33 +00:00
Sergey Biryukov
d58bcae1ad Media: Return early from media_sideload_image() if $file didn't match the pattern for images.
Props MikeHansenMe, serpent7776.
Fixes #32755.

git-svn-id: https://develop.svn.wordpress.org/trunk@34984 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-09 04:46:00 +00:00
Sergey Biryukov
fc966fd45d Dashboard: Display year in Activity widget if the post date year is not the same as the current one.
Props GaryJ, chriscct7.
Fixes #26502.

git-svn-id: https://develop.svn.wordpress.org/trunk@34980 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-09 04:25:23 +00:00
Sergey Biryukov
b39b5b8758 My Sites: Make "Create a New Site" link consistent with other "Add New" links.
Props JeffMatson.
Fixes #34179.

git-svn-id: https://develop.svn.wordpress.org/trunk@34979 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-09 03:49:24 +00:00
Sergey Biryukov
fb6d5f4aba After [34529], if a compatible termmeta table is found on database upgrade, convert it to utf8mb4 collation.
Props dboulet.
Fixes #34224.

git-svn-id: https://develop.svn.wordpress.org/trunk@34978 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-09 02:06:15 +00:00
Andrew Ozz
5a55add794 JS: in event callbacks replace the very outdated return false with preventDefault().
Props adamsilverstein.
Fixes #18590.

git-svn-id: https://develop.svn.wordpress.org/trunk@34977 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-09 01:26:46 +00:00
Helen Hou-Sandi
c010db6ae4 Revisions: Update slider handle styling.
This brings them in line with updated buttons as done in [34948] for #31459. It also gives it secondary action styling as opposed to primary, as restoring is considered the primary action.

props hugobaeta.
fixes #34220.


git-svn-id: https://develop.svn.wordpress.org/trunk@34976 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-09 00:24:36 +00:00
John Blackbourn
8a7f8602b3 Remove HTML escaping for the plugin name and author fields that are displayed when deleting a plugin.
While it might seem counter-intuitive to remove HTML escaping, these fields are already safe (they originate in `_get_plugin_data_markup_translate()` which handles sanitization and escaping), and the AuthorName field actually allows some HTML. This change prevents escaped HTML from appearing here.

Fixes #25422


git-svn-id: https://develop.svn.wordpress.org/trunk@34973 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 23:13:00 +00:00
John Blackbourn
bc043c51e8 Introduce the ability to filter the Users admin listing screen by users with no role, if such users exist.
Fixes #22993
Props spmlucas, johnbillion


git-svn-id: https://develop.svn.wordpress.org/trunk@34965 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 22:06:46 +00:00
John Blackbourn
b02c884370 On the Users list table, show all the roles of a user in a comma-separated list if they have more than one role. This prevents role obfuscation in situations where a user has had more than one role programmatically assigned to them.
Fixes #22959
Props scribu, JustinSainton, DrewAPicture, johnbillion


git-svn-id: https://develop.svn.wordpress.org/trunk@34963 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 21:58:34 +00:00
Drew Jaynes
e215ca23f4 Docs: Normalize documentation spacing in the DocBlocks for add_meta_box() and remove_meta_box() following [34951].
Fixes #15000.


git-svn-id: https://develop.svn.wordpress.org/trunk@34952 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 19:12:25 +00:00
Drew Jaynes
a6e9d49467 Administration: Add the ability to pass an array of screen IDs to add_meta_box() and remove_meta_box().
The `$screen` parameter in both functions can now accept a single screen ID, `WP_Screen` object, or an array of screen IDs.

Adds tests.

Props coffee2code, iamfriendly, madalinungureanu, mordauk, igmoweb, meloniq, DrewAPicture.
See #15000.


git-svn-id: https://develop.svn.wordpress.org/trunk@34951 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 19:06:32 +00:00
Helen Hou-Sandi
df1b726ed0 Buttons: Update styles and colors.
* Aligns with the color standards. See https://make.wordpress.org/design/handbook/foundations/colors/
* Creates a consistent interaction experience between states.
* Improves contrast and accessibility.

props hugobaeta, afercia, melchoyce, michael-arestad.
fixes #31459.


git-svn-id: https://develop.svn.wordpress.org/trunk@34948 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 17:30:57 +00:00
Dominik Schilling (ocean90)
f771be9e2c Term Meta: Prevent a "Multiple primary key defined" error during database upgrades.
You must have two spaces between the words `PRIMARY KEY` and the definition of your primary key. Yes, seriously.

See [34529].
Fixes #34210.

git-svn-id: https://develop.svn.wordpress.org/trunk@34936 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 11:08:15 +00:00
John Blackbourn
88779c7b67 Revert [34917] until the broken test is fixed.
See #13382


git-svn-id: https://develop.svn.wordpress.org/trunk@34925 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 01:03:39 +00:00
John Blackbourn
ee251924b3 Pass the $post parameter to the _wp_post_revision_fields filter. This provides more context to the filter, which allows for different fields to be displayed on the revisions screen depending on the post.
The `_wp_post_revision_fields()` function now also accepts a `WP_Post` object (in addition to an array of post fields) to facilitate this change.

Fixes #13382
Props adamsilverstein


git-svn-id: https://develop.svn.wordpress.org/trunk@34917 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 21:52:18 +00:00
Andrea Fercia
8483316de5 Bump H3 headings to H2 on the Network Admin > Sites > Edit Site screens.
The navigation tabs appear in an `<h3>` heading immediately following the main `<h1>` and need to have a proper hierarchy.
Also, fix the tabs focus style and introduce a new `.nav-tab-small` CSS class.

Fixes #34079.

git-svn-id: https://develop.svn.wordpress.org/trunk@34913 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 17:34:56 +00:00
Jeremy Felt
599fb50e09 Revert [34778], continue using _site_option() for the current network.
The `_network_option()` parameter order will be changing to accept `$network_id` first. The `_site_option()` functions will remain in use throughout core as our way of retrieving a network option for the current network.

See #28290.


git-svn-id: https://develop.svn.wordpress.org/trunk@34912 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 17:11:01 +00:00
Drew Jaynes
9a704fa0b8 Docs: Improve documentation for post_submit_meta_box(), which serves as the display callback for the 'Publish' meta box.
* `$post` is now correctly defined as being of the `WP_Post` type
* Adds a hash notation for the `$args` array
* Other minor fixes.

Props drebbitsweb.
Fixes #34171.


git-svn-id: https://develop.svn.wordpress.org/trunk@34911 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 16:33:52 +00:00
Scott Taylor
02251dcd5d List Tables: in _WP_List_Table_Compat::get_column_info(), also return $primary, which is expected since [33016].
Props tyxla.
Fixes #34148.


git-svn-id: https://develop.svn.wordpress.org/trunk@34897 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 03:11:52 +00:00
Scott Taylor
7665377058 Meta Boxes: add an action, post_submitbox_minor_actions. post_submitbox_misc_actions already exists. Pass $post to both for context - avoids having to check for a global post.
Props jonathanbardo, chriscct7, DrewAPicture.
Fixes #26267.


git-svn-id: https://develop.svn.wordpress.org/trunk@34895 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 02:44:59 +00:00
Scott Taylor
dae3ea83cb Meta Boxes: reboot some of the code in postbox.js to support aria-expanded attribute toggling and to properly reference static class properties.
Props afercia, wonderboymusic.
Fixes #33754.


git-svn-id: https://develop.svn.wordpress.org/trunk@34893 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 01:57:06 +00:00
Scott Taylor
b7c01dc018 List Tables: after [34276], decrease horizontal padding for sorted column headers (causing weirdness in the Count column of tax list tables) - the vertical padding change suffices in fixing the original issue.
Fixes #27945.


git-svn-id: https://develop.svn.wordpress.org/trunk@34892 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 01:39:27 +00:00
Scott Taylor
9e267b6e72 List Tables/WP_Screen: in WP_Screen, add methods to store, retrieve, and render screen reader text, primarily used by list table screens.
These additions are based on an audit and recommendations by the Accessibility team. #a11y'all

Props afercia.
Fixes #32147.


git-svn-id: https://develop.svn.wordpress.org/trunk@34891 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 01:27:01 +00:00
Scott Taylor
6507668f4e Posts List Table: ensure that "All" gets the "current" CSS class when applicable.
Props afercia.
Fixes #19609.


git-svn-id: https://develop.svn.wordpress.org/trunk@34889 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 00:08:42 +00:00
Weston Ruter
346ebe0993 Customizer: Ensure that wp.customize.Widgets.savedWidgetIds is defined up front.
In 4.3 the widget controls were fully initialized up front along with the sidebar controls. The sidebar control depended (unnecessarily) on the widget control to ensure that `wp.customize.Widgets.savedWidgetIds` was defined. So after [34563] there could be a situation where the widgets are added/removed from a sidebar before their controls are initialized (if the sidebar section is never expanded), resulting in an error attempting to get a property off of an undefined value. So this change does the right thing and defines `savedWidgetIds` up front.

Also changes the `savedWidgetIds` variable type from an array to an object, to match how it is used as a dictionary lookup.

See #33901.


git-svn-id: https://develop.svn.wordpress.org/trunk@34883 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 21:58:48 +00:00
Dominik Schilling (ocean90)
1e06e917af MS Themes List Table: Fix inverted logic for displaying the "No items" message.
Fixes #25464.

git-svn-id: https://develop.svn.wordpress.org/trunk@34873 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 17:34:54 +00:00
Scott Taylor
719f51b19d Setup/Config: some dirname( ABSPATH ) file lookups should have errors suppressed due to possibility of open_basedir restrictions on hosts.
Props chriscct7, misterunknown.
Fixes #29680.


git-svn-id: https://develop.svn.wordpress.org/trunk@34867 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 14:19:17 +00:00
Scott Taylor
bb2c59c3a8 Media: in wp_read_video|audio_metadata(), set GETID3_TEMP_DIR to get_temp_dir() if it is not defined. This is a workaround for when safe_mode is enabled pre-PHP 5.3.
Props chriscct7, tomsommer.
Fixes #26265.


git-svn-id: https://develop.svn.wordpress.org/trunk@34866 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 14:13:49 +00:00
Scott Taylor
d71eb86075 Admin Menu: remove duplicated separators, and use strpos() (instead of strcmp()) when determining if the separator CSS class is present.
Props rilwis, chriscct7.
Fixes #24104.


git-svn-id: https://develop.svn.wordpress.org/trunk@34861 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 13:45:24 +00:00
Drew Jaynes
fe383af11a Multisite: Introduce get_subdirectory_reserved_names(), which returns a filterable list of reserved subdirectory site names.
The function encapsulates the existing `subdirectory_reserved_names` filter and reduces the maintenance burden of keeping the value of (currently) two instances of the same hook in sync.

See #33615.


git-svn-id: https://develop.svn.wordpress.org/trunk@34854 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 04:34:03 +00:00
Scott Taylor
9fe13be519 oEmbed: add embed to $subdirectory_reserved_names.
Props jeremyfelt.
See #32522.


git-svn-id: https://develop.svn.wordpress.org/trunk@34850 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 03:44:25 +00:00
Dominik Schilling (ocean90)
f79a9d4ca2 Media List Table: Remove the date display in column_parent().
It should be the time at which the post was written, but it was never because of the missing `$parent` argument.

Fixes #33238.

git-svn-id: https://develop.svn.wordpress.org/trunk@34839 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 22:24:41 +00:00
John Blackbourn
d8c9450179 Correct pagination when viewing the 'Mine' link on the post listing screen.
Fixes #19609
Props ocean90


git-svn-id: https://develop.svn.wordpress.org/trunk@34837 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 21:35:18 +00:00
Weston Ruter
a743e47af8 Customizer: Reset horizontal scroll position when finished dragging a nav menu item.
Props karinedo, austinginder, adamsilverstein, tyxla.
Fixes #33367.


git-svn-id: https://develop.svn.wordpress.org/trunk@34834 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 20:45:57 +00:00
Helen Hou-Sandi
3cde6d29c7 Permalinks: Slightly lengthen the truncated slug for display.
This brings it closer to the width of the input so there is less jumping around of buttons. We can afford the space now that other buttons in the space are typically no longer there.

fixes #18306.


git-svn-id: https://develop.svn.wordpress.org/trunk@34833 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 19:28:19 +00:00
Drew Jaynes
3e29193b98 Revisions: Also pass the $revision post object to the wp_prepare_revision_for_js filter, introduced in [34541].
Props helen.
Fixes #28627.


git-svn-id: https://develop.svn.wordpress.org/trunk@34832 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 18:32:38 +00:00
Drew Jaynes
d95423c091 Docs: Document the $revision_data parameter passed to the wp_prepare_revision_for_js filter with a hash notation.
The hook was introduced in [34541].

See #28627.


git-svn-id: https://develop.svn.wordpress.org/trunk@34831 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 18:02:41 +00:00
Weston Ruter
32b604e984 Customizer: Fix moving focus to available nav menu items search.
Fixes regression introduced in [34219].

Props tyxla.
See #33360.
Fixes #34125 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@34829 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 15:26:59 +00:00
Boone Gorges
578134d4ff Use wp_installing() instead of WP_INSTALLING constant.
The `WP_INSTALLING` constant is a flag that WordPress sets in a number of
places, telling the system that options should be fetched directly from the
database instead of from the cache, that WP should not ping wordpress.org for
updates, that the normal "not installed" checks should be bypassed, and so on.

A constant is generally necessary for this purpose, because the flag is
typically set before the WP bootstrap, meaning that WP functions are not yet
available.  However, it is possible - notably, during `wpmu_create_blog()` -
for the "installing" flag to be set after WP has already loaded. In these
cases, `WP_INSTALLING` would be set for the remainder of the process, since
there's no way to change a constant once it's defined. This, in turn, polluted
later function calls that ought to have been outside the scope of site
creation, particularly the non-caching of option data. The problem was
particularly evident in the case of the automated tests, where `WP_INSTALLING`
was set the first time a site was created, and remained set for the rest of the
suite.

The new `wp_installing()` function allows developers to fetch the current
installation status (when called without any arguments) or to set the
installation status (when called with a boolean `true` or `false`). Use of
the `WP_INSTALLING` constant is still supported; `wp_installing()` will default
to `true` if the constant is defined during the bootstrap.

Props boonebgorges, jeremyfelt.
See #31130.

git-svn-id: https://develop.svn.wordpress.org/trunk@34828 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 15:05:26 +00:00
Drew Jaynes
d67c6d2ade Docs: Add a missing DocBlock summary for wp_list_widget_controls_dynamic_sidebar().
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34827 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 03:05:53 +00:00
Drew Jaynes
39af3ca810 Docs: Add missing DocBlock summaries for five functions in wp-admin/includes/template-functions.php.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34826 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 03:02:20 +00:00
Drew Jaynes
4e86eb7cd4 Docs: Add missing DocBlock summaries to three functions in wp-admin/includes/plugin.php.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34825 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 02:54:56 +00:00
Drew Jaynes
960526cdbc Docs: Add missing summaries for functions in wp-admin/includes/misc.php.
Also restructures the summary for `update_home_siteurl()`.

See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34824 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 02:51:08 +00:00
Drew Jaynes
e9e26c5726 Docs: Add missing DocBlock summaries for a multitude of functions in wp-admin/includes/media.php.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34823 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 02:43:49 +00:00