Commit Graph

3571 Commits

Author SHA1 Message Date
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
Drew Jaynes 61cd633892 Docs: Add missing method summaries for the deprecated `WP_User_Search` class, including `prepare_query()`, `query()`, `prepare_vars_for_template_usage()`, `do_paging()`, and `get_results()`.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34822 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 02:34:47 +00:00
Drew Jaynes c8537e7ced Docs: Add missing summaries for three deprecated admin functions: `dropdown_categories()`, `dropdown_link_categories()`, and `wp_dropdown_cats()`.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34821 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 02:28:33 +00:00
Drew Jaynes f5066a38f2 Docs: Document the plugin data array returned by `get_plugin_data()` with a hash-notation.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34818 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-04 19:05:38 +00:00
Drew Jaynes 14b8056d24 Users: Don't pass the current `WP_Users_List_Table` or `WP_MS_Users_List_Table` instance to the `users_list_table_query_args` filter after all.
After some discussion, it was decided that Multisite vs single site context can just as easily be derived using available functions like `is_network_admin()`, `get_current_screen()`, etc., rendering the second parameter moot. The hook was introduced in [34796].

Fixes #25360.


git-svn-id: https://develop.svn.wordpress.org/trunk@34813 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 21:48:35 +00:00
Sergey Biryukov ee0d153629 Merge some strings in `wp-admin/upload.php` with existing strings with the same meaning.
Props pavelevap.
Fixes #31727.

git-svn-id: https://develop.svn.wordpress.org/trunk@34797 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 13:56:05 +00:00
Drew Jaynes 433f6600c0 Users: Introduce the `users_list_table_query_args` filter, for modifying the `WP_User_Query` arguments used within the `prepare_items()` methods in the users list tables.
The current list table is passed as a second parameter, `$this`, and can take the form of either a `WP_Users_List_Table` or `WP_MS_Users_List_Table` instance depending on the context in which the filter was evaluated.

Props juliobox for the initial patch.
Fixes #25360.


git-svn-id: https://develop.svn.wordpress.org/trunk@34796 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 07:23:20 +00:00
Sergey Biryukov 68f5a79880 Respect the `force_delete` parameter of `get_delete_post_link()`.
Previously, it only worked if `EMPTY_TRASH_DAYS` was disabled.

Props johnbillion, chriscct7.
Fixes #26832.

git-svn-id: https://develop.svn.wordpress.org/trunk@34794 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 01:49:52 +00:00
Weston Ruter 2ef0449316 Customize: Fix `nav_menu_item` CSS `classes` array being incorrectly presented in input field as comma-delimited list.
Instead of using `Array.toString()` to serialize an array with comma delimiters, explicitly `join` the array using spaces instead. Also ensure that `xfn` is handled properly if it ever gets stored as an array. 

Props tyxla, westonruter.
Fixes #34111.


git-svn-id: https://develop.svn.wordpress.org/trunk@34788 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 00:14:22 +00:00
John Blackbourn 780460af28 Remove the unnecessary dynamic prefix used in the `plugin_action_links` filter name, and in those of its brethren. This way, `network_admin_plugin_action_links` gets listed as a separate filter.
Fixes #34117


git-svn-id: https://develop.svn.wordpress.org/trunk@34786 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-02 23:43:20 +00:00
John Blackbourn 3fee278cf4 Switch the remaining user-facing links to wordpress.org over to HTTPS.
Fixes #27115


git-svn-id: https://develop.svn.wordpress.org/trunk@34783 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-02 22:45:53 +00:00
Jeremy Felt 3c177b8c6f MS: Use `*_network_option()` functions throughout core.
Replaces all uses of `*_site_option()` with the corresponding "network" function.

This excludes one usage in `wp-admin/admin-footer.php` that needs more investigation.

Props spacedmonkey.
See #28290.


git-svn-id: https://develop.svn.wordpress.org/trunk@34778 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-02 19:07:23 +00:00
Drew Jaynes 80e4265277 Docs: Also clarify the expected element types depending on the value of `$action` in the hook doc for the `plugins_api` filter.
See [34763] for context.

See #34035.


git-svn-id: https://develop.svn.wordpress.org/trunk@34764 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-02 04:51:39 +00:00
Drew Jaynes 4c6d50413b Docs: Clarify the expected replacement element type if replacing the object or array in `plugins_api()` via the `plugins_api` hook.
If the `$action` type is 'query_plugins' or 'plugin_information', the API will return an object, thus an object should be passed if replacing it. For 'hot_tags' and 'hot_categories', the same logic applies, but with arrays instead.

See #34035.


git-svn-id: https://develop.svn.wordpress.org/trunk@34763 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-02 04:47:14 +00:00
Scott Taylor c152375b58 Plugins: on the Install page, move the name of each plugin into the `<h4>` to accommodate screen readers.
Props afercia, ChrisMKindred.
Fixes #32400.


git-svn-id: https://develop.svn.wordpress.org/trunk@34760 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-02 04:15:12 +00:00
Dominik Schilling (ocean90) b2bb4ea2d5 Install: Replace the "Privacy" setting with the "Search Engine Visibility" setting from Reading Settings.
Props Clorith, ocean90.
Fixes #27628.
See #16416.

git-svn-id: https://develop.svn.wordpress.org/trunk@34752 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 21:34:38 +00:00
Dominik Schilling (ocean90) 00762410b0 Upgrader: Clear plugin/theme caches directly after a plugin/theme has been installed.
`wp_update_plugins()` and `wp_update_themes()` are both hooked into `upgrader_process_complete` with priority 10. But at this stage the caches in `get_plugins()`, `search_theme_directories()`, and `wp_get_themes()` aren't refreshed yet so both functions couldn't fetch any translations for the new plugin/theme.
To reset the caches `wp_clean_themes_cache()` and `wp_clean_plugins_cache()` are now hooked into `upgrader_process_complete` with priority 9.

Fixes #34029.

git-svn-id: https://develop.svn.wordpress.org/trunk@34751 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 21:20:09 +00:00
Jeremy Felt a8b5a8ec63 MS: Remove registration of ID column in Sites and Users list tables.
Reverts a portion of [34289] and leaves the render for the column behind. A plugin can register these fields for display via filter.

Fixes #18661.


git-svn-id: https://develop.svn.wordpress.org/trunk@34750 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 20:57:06 +00:00
Jeremy Felt b71708647c MS: Provide better UI when a main site's `/blog` prefix is changed.
The main site on a new network is forced by default into using `/blog` as the prefix for its permalink structure. This can be changed easily through the network admin, though the `options-permalink.php` screen is then unusable to make further changes to the structure.

Now, if `/blog/` is not at the beginning of the `permalink_structure` option, we do not force `/blog` as a prefix in the UI.

Fixes #12002.


git-svn-id: https://develop.svn.wordpress.org/trunk@34749 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 20:38:40 +00:00
Dominik Schilling (ocean90) 2f16a92362 Language Upgrader: Re-use the automatic upgrader skin if the parent upgrader is using it.
Prevents broken Ajax responses when `Language_Pack_Upgrader::async_upgrade()` gets triggered during a shiny update.

Fixes #34048.

git-svn-id: https://develop.svn.wordpress.org/trunk@34748 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 20:24:18 +00:00
Andrea Fercia 875ed40ffb In `wp_comment_reply()` change the H5 headings in fieldset legends for better accessibility.
Also, add a "Edit Comment" legend before the Quick Edit form to pair it with "Reply to Comment" and "Add new Comment" and move the Name, Email, and URL fields after the Comment textarea.

Props joedolson, afercia.

Fixes #33757.

git-svn-id: https://develop.svn.wordpress.org/trunk@34743 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 14:51:25 +00:00
Andrea Fercia b61d943435 Bump H3 headings to H2 on the Network Site Users screen for better accessibility.
Fixes #34081.

git-svn-id: https://develop.svn.wordpress.org/trunk@34742 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 14:32:15 +00:00
Dion Hulse e4a147150e Rewrite `insert_with_markers()` to use `flock()` when available, significant cleanup of the function too.
The call to `flock()` is an exclusive advisory lock, which in my testing only PHP respects (apache continues to read it).
Not all filesystems support locking (remote NFS mounts for example) so this offers minimal benefit to those platforms, but offers much better protection against file corruption on systems which do support it.
The call is blocking, so a second process will wait for the first to complete before writing if supported.

See #31767


git-svn-id: https://develop.svn.wordpress.org/trunk@34740 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 07:45:35 +00:00
Dion Hulse f99f06206e Updates: SSH2 Transport: Add a connection error when the SFTP subsystem cannot be initialized.
Fixes #33478


git-svn-id: https://develop.svn.wordpress.org/trunk@34739 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 05:42:20 +00:00