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
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
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
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
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
When a new user is created in various places throughout the interface,
notifications are sent to the site admin and the new user. Previously, these
notifications were fired through direct calls to `wp_new_user_notification()`,
making it difficult to stop or modify the messages.
This changeset introduces a number of new action hooks in place of direct calls
to `wp_new_user_notification()`, and hooks the new wrapper function
`wp_send_new_user_notifications()` to these hooks.
Props dshanske, thomaswm, boonebgorges.
Fixes#33587.
git-svn-id: https://develop.svn.wordpress.org/trunk@34251 602fd350-edb4-49c9-b593-d223f7449a82
The `user_login` field only allows 60 characters, and `user_nicename` allows
50. However, there are no protections in the interface, and few in the code,
that prevent the creation of users with values in excess of these limits. Prior
to recent changes in `$wpdb`, users were generally created anyway, MySQL
having performed the necessary truncation. More recently, the `INSERT`s and
`UPDATE`s simply fail, with no real feedback on the nature of the failure.
This changeset addresses the issue in a number of ways:
* On the user-new.php and network/user-new.php panels, don't allow input in excess of the maximum field length.
* In `wp_insert_user()`, throw an error if the value provided for `'user_login'` or `'user_nicename'` exceeds the maximum field length.
* In `wp_insert_user()`, when using `'user_login'` to generate a default value for `'user_nicename'`, ensure that the nicename is properly truncated, even when suffixed for uniqueness (username-2, etc).
Props dipesh.kakadiya, utkarshpatel, tommarshall, boonebgorges.
Fixes#33793.
git-svn-id: https://develop.svn.wordpress.org/trunk@34218 602fd350-edb4-49c9-b593-d223f7449a82
The second parameter `$plaintext_pass` was removed in [33023] and restored as `$notify` in [33620] with a different behavior. If you have a plugin overriding `wp_new_user_notification()` which hasn't been updated you would get a notification with your username and the password "both".
To prevent this the second parameter is now deprecated and reintroduced as the third parameter.
Adds unit tests.
Props kraftbj, adamsilverstein, welcher, ocean90.
Fixes#33654.
(Don't ask for new pluggables kthxbye)
git-svn-id: https://develop.svn.wordpress.org/trunk@34116 602fd350-edb4-49c9-b593-d223f7449a82
The previous move from `echo()` to `_e()` left some of the output hanging. Introduced in [32333].
Props figureone.
Fixes#33811 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@34012 602fd350-edb4-49c9-b593-d223f7449a82
In [32759] and [33586], we combined the domain and path entry for a site to a single "Site URL" field. This updates the help text to reflect that.
Fixes#33748. See #22383.
git-svn-id: https://develop.svn.wordpress.org/trunk@33921 602fd350-edb4-49c9-b593-d223f7449a82
After [33023] users would always be notified, this restores previous behavior.
Props markjaquith, ocean90.
Fixes#33358.
git-svn-id: https://develop.svn.wordpress.org/trunk@33620 602fd350-edb4-49c9-b593-d223f7449a82
In [32759], we adjusted `site-info.php` to display a single input for a site's full URL if the network was configured for subdomains. We also enforced path only editing for non-subdomain networks, which is a regression in expected behavior.
The full URL of a site can now be edited in both subdomain and subdirectory configurations.
Props @michaelryanmcneill.
Fixes#22383.
git-svn-id: https://develop.svn.wordpress.org/trunk@33586 602fd350-edb4-49c9-b593-d223f7449a82
After [33173], bulk actions would not process due to broken verification of the `bulk-sites` action. This reintroduces the proper action and treats bulk actions differently than individual site actions.
See #32963.
git-svn-id: https://develop.svn.wordpress.org/trunk@33194 602fd350-edb4-49c9-b593-d223f7449a82
* Use the site's name rather than URL in the Edit Site header.
* Provide "Visit" and "Dashboard" links for the site on all tabs.
Props @Fab1en, @jeremyfelt.
Fixes#32525.
git-svn-id: https://develop.svn.wordpress.org/trunk@33186 602fd350-edb4-49c9-b593-d223f7449a82
* Simplify URLs used for row actions to remove messaging and site domain/path.
* Use confirmation messaging from a managed list of actions when handling the request.
* Find the site address from the site ID rather than using information passed in the URL.
Fixes#32963.
git-svn-id: https://develop.svn.wordpress.org/trunk@33173 602fd350-edb4-49c9-b593-d223f7449a82
This corrects both the standard wp-admin new user form and the network new user form.
Props @brad2dabone, @sunnnyratilal.
Fixes#32644.
git-svn-id: https://develop.svn.wordpress.org/trunk@33160 602fd350-edb4-49c9-b593-d223f7449a82
After [32974] these links are no longer within an `h2`, making the class name
inaccurate. `add-new-h1` has the potential to expose the same problem for in a
possible future change.
Fixes#31650.
git-svn-id: https://develop.svn.wordpress.org/trunk@33067 602fd350-edb4-49c9-b593-d223f7449a82
First step towards restoring a good heading structure in wp-admin.
The previous `<h1>` contained the site title and a link to the front page and was removed with the toolbar refactoring in 3.2.
Props joedolson, afercia.
Fixes#31650.
git-svn-id: https://develop.svn.wordpress.org/trunk@32974 602fd350-edb4-49c9-b593-d223f7449a82
We also need to set novalidate on the form due to some browsers rejecting valid email addresses containing an IDN. We should holistically investigate whether this is still an issue in any major browsers at some point.
props earnjam.
fixes#32643.
git-svn-id: https://develop.svn.wordpress.org/trunk@32774 602fd350-edb4-49c9-b593-d223f7449a82
Now that we decide when to automatically update `home` and `siteurl`, we no longer need to switch to the site while displaying the form output.
See #32503.
git-svn-id: https://develop.svn.wordpress.org/trunk@32761 602fd350-edb4-49c9-b593-d223f7449a82
Rather than provide a checkbox to update the `siteurl` and `home` options, we can make an educated decision based on the current state. If the home and/or siteurl domain and path match the existing domain and path of the site, then we update with the new information.
Also, while scheme is not stored in `wp_blogs` along with a site, the scheme of the `home` and `siteurl` options can now be modified via the Site URL setting in `site-info.php` when the `home` and/or `siteurl` options match the existing domain.
Props @hugobaeta, @earnjam, @jeremyfelt.
Fixes#32503, see #22383.
git-svn-id: https://develop.svn.wordpress.org/trunk@32760 602fd350-edb4-49c9-b593-d223f7449a82
When a network is configured as subdomain, allow for the input of arbitrary domain and path combinations when editing a site rather than just the domain.
This takes a step or two toward #32503.
Props @scribu, @ericlewis, @jeremyfelt.
See #22383.
git-svn-id: https://develop.svn.wordpress.org/trunk@32759 602fd350-edb4-49c9-b593-d223f7449a82
Fix some egregious uses of tabbing.
Some functions can simply return `apply_filters(...)` instead of setting a variable that is immediately returned.
See #32444.
git-svn-id: https://develop.svn.wordpress.org/trunk@32654 602fd350-edb4-49c9-b593-d223f7449a82
These no longer return upon refreshing the page when JS is on and working, so users should be able to dismiss them. This is particularly important on the post edit screen when DFW is triggered, but pretty much all notices can be dismissed if needed. A post on Make/Core will follow with information on how this can be leveraged in plugins.
props valendesigns, afercia, paulwilde, adamsilverstein, helen.
fixes#31233. see #23367.
git-svn-id: https://develop.svn.wordpress.org/trunk@31973 602fd350-edb4-49c9-b593-d223f7449a82
This allows for using proper plural forms in languages with more than two forms, and also resolves string conflicts when the same string is present in both singular and plural form.
fixes#28502.
git-svn-id: https://develop.svn.wordpress.org/trunk@31941 602fd350-edb4-49c9-b593-d223f7449a82
Previously the label just said "Posts", "Pages", or "Comments". This was bad in terms of accessibility and internationalization because of missing context.
This change adds a default label "Number of items per page:" to `WP_Screen->render_per_page_options()` and removes all the existing one-word labels.
props afercia.
fixes#31349, #15576.
git-svn-id: https://develop.svn.wordpress.org/trunk@31696 602fd350-edb4-49c9-b593-d223f7449a82
When the error message "You do not have permission to access this page" is used in network admin screens, return an HTTP status code of 403 to match. Previously: [30356] and [31300].
Props yo-l1982.
Fixes#31422.
git-svn-id: https://develop.svn.wordpress.org/trunk@31658 602fd350-edb4-49c9-b593-d223f7449a82
When deleting a user who is not associated with any sites, the current messaging can be confusing as only users associated with at least one site actually appear on the confirmation page for deletion.
This experience can be improved by showing all users being deleted as well as their current site associations.
* If an empty array of users is passed, don't attempt to confirm deletion.
* If one user is passed, show a message crafted for a user of one.
* If multiple users are passed, show a message crafted for many.
* Show the pending results of all users to be deleted.
* Update messaging around the deletion/confirmation process to be less misleading.
Props Idealien, HarishChaudhari, DrewAPicture.
Fixes#18132.
git-svn-id: https://develop.svn.wordpress.org/trunk@31656 602fd350-edb4-49c9-b593-d223f7449a82
* Add labels previously missing for many inputs throughout the network admin screen.
* Add proper `aria-describedby` attributes to provide better descriptions.
* Wrap grouped inputs with `fieldset` elements.
* Remove now unneeded `title` attributes when appropriate.
Props cfoellmann, afercia, rianrietveld.
Fixes#38406.
git-svn-id: https://develop.svn.wordpress.org/trunk@31517 602fd350-edb4-49c9-b593-d223f7449a82
When editing a site, if `home` and `siteurl` are checked to be updated along with a site's domain and path, they should receive the results of any modifications in `update_blog_details()` rather than trusting the POST data.
Previously, it was possible to save a value without a leading slash on the path, causing an invalid URL to be stored.
Props earnjam.
Fixes#30417.
git-svn-id: https://develop.svn.wordpress.org/trunk@31156 602fd350-edb4-49c9-b593-d223f7449a82
Affects DocBlocks for the following hooks:
* `network_admin_edit_' . $_GET['action']`
* `network_sites_updated_message_' . $_GET['updated']`
See #30552.
git-svn-id: https://develop.svn.wordpress.org/trunk@30647 602fd350-edb4-49c9-b593-d223f7449a82
The language dropdown now includes installed languages and all available translations when the filesystem is writable by WordPress.
Go to wp-admin/options-general.php, select one of the available translations, submit the form and let WordPress handle the rest.
Works for Multisite's Default Language too.
see #29395.
git-svn-id: https://develop.svn.wordpress.org/trunk@30335 602fd350-edb4-49c9-b593-d223f7449a82
Email addresses entered in a number of interfaces were not being stripslashed
properly, with the result that the emails were not being recognized as valid.
Fixes#18039.
git-svn-id: https://develop.svn.wordpress.org/trunk@29966 602fd350-edb4-49c9-b593-d223f7449a82
Check the emptiness of the admin email before using `sanitize_email()` and `is_email()` to determine if the address is valid.
Fixes#17890
git-svn-id: https://develop.svn.wordpress.org/trunk@29877 602fd350-edb4-49c9-b593-d223f7449a82
This is for translation files in WP_LANG_DIR which are installed through a language pack.
Change `wp_get_installed_translations()` to only return a translation if the .mo file also exists.
fixes#29860.
git-svn-id: https://develop.svn.wordpress.org/trunk@29856 602fd350-edb4-49c9-b593-d223f7449a82
* Don't display update count for Themes when the user doesn't have the 'update_themes' cap
* Don't display update count for Plugins when there aren't any/count is `0`
Props peterchester.
Fixes#29651.
git-svn-id: https://develop.svn.wordpress.org/trunk@29817 602fd350-edb4-49c9-b593-d223f7449a82
* Use the same default value for 'upload_filetypes' as on Network Settings screen.
props rmccue.
fixes#29512 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@29718 602fd350-edb4-49c9-b593-d223f7449a82
* The WPLANG constant is no longer needed. Remove define('WPLANG', ''); from wp-config-sample.php. Populate WPLANG option based on the WPLANG constant. When get_option('WPLANG') is an empty string it will override WPLANG.
* Introduce translations_api() which is available to communicate with the translation API. Move translation install related functions to a new file.
* Replace mu_dropdown_languages() with wp_dropdown_languages(). wp_dropdown_languages() is now populated by the translation API.
* Remove wp_install_load_language() and allow load_default_textdomain() to switch a core translation.
fixes#13069, #15677, #19760, #28730, #29281.
git-svn-id: https://develop.svn.wordpress.org/trunk@29630 602fd350-edb4-49c9-b593-d223f7449a82
* `wp-activate.php` and `wp-admin/themes.php` don't need the closing PHP tag
* Switch single quotes for HTML attribute values to double in a few places
* Convert `include_once file.php` syntax to `include_once( 'file.php' )`
* Add access modifiers to methods/members in: `_WP_List_Table_Compat`, `Walker_Nav_Menu_Edit`, `Walker_Nav_Menu_Checklist`, `WP_Screen`, `Walker_Category_Checklist`
* `edit_user()` doesn't need to import the `$wpdb` global
* `wp_list_widgets()` doesn't need to import the `$sidebars_widgets` global
* switch/endswitch syntax is not supported in Hack
* A `<ul>` in `wp-admin/users.php` is unclosed
See #27881.
git-svn-id: https://develop.svn.wordpress.org/trunk@28500 602fd350-edb4-49c9-b593-d223f7449a82
If you want to use a Dashicon before an element you can use the class because it will not change the elements content styling. With that you don't need to copy the entire `.dashicons` styling to your :before styling anymore.
To demonstrate this change, Admin Menu now uses Dashicons classes directly.
And it fixes a glitch in IE.
fixes#26630.
git-svn-id: https://develop.svn.wordpress.org/trunk@27418 602fd350-edb4-49c9-b593-d223f7449a82
JavaScript is rarely disabled, but graceful degradation is still important. For example, syntax errors can occur, usually with major WP updates that overhaul entire experiences and update external libraries combined with themes or plugins doing weird or old things. If this error is due to their current theme, a user needs to be able to access the themes screen to switch away from the theme. A more subtle issue could make things painful to diagnose.
This commit renders the grid in PHP (the template is duplicated, but it lightweight, fairly mundane, and easy to sync). On Backbone render, the grid is then re-rendered from JavaScript so searches can occur. Customize and Live Preview is disabled if JS fails to kick in. If JS is disabled, old-school "Preview" links are displayed.
No-Customizer support: The customizer is only supported when the browser supports postMessage (IE8+), and if the frontend is a different domain, CORS (IE10+). We use the .hide-if-no-customize class for this. Pre-customize "Preview" links should use .hide-if-customize.
The .load-customize class should be used to declare a link that opens the customizer. This enables customize-loader.js to intercept this link and load the customizer on top of the current window, making for a smoother experience.
fixes#25964.
git-svn-id: https://develop.svn.wordpress.org/trunk@26726 602fd350-edb4-49c9-b593-d223f7449a82
* Creating a wp-config.php file
* Installation
* Database upgrade
* Database repair
* Readme.html
* Network sites actions
What's changed:
* Bring background/text/link/border colours in line with mp6
* Bring fonts in line with mp6 (see note below)
* Switch to device-width for the viewport and tweak margins etc so the layout works nicely on all device sizes
* Switch to the new vector WordPress logo in the header to match the log in screen
* Force table cells into rows in the <782px media query
Fixes#25951, props johnbillion.
git-svn-id: https://develop.svn.wordpress.org/trunk@26298 602fd350-edb4-49c9-b593-d223f7449a82
* All WordPress files move to a src/ directory.
* New task runner (Grunt), configured to copy a built WordPress to build/.
* svn:ignore and .gitignore for Gruntfile.js, wp-config.php, and node.js.
* Remove Akismet external from develop.svn. Still exists in core.svn.
* Drop minified files from src/. The build process will now generate these.
props koop.
see #24976.
and see http://wp.me/p2AvED-1AI.
git-svn-id: https://develop.svn.wordpress.org/trunk@25001 602fd350-edb4-49c9-b593-d223f7449a82