Commit Graph

128 Commits

Author SHA1 Message Date
Sergey Biryukov
dce1c91514 Dashboard: Append the current locale to dashboard RSS widget cache key in wp_dashboard_rss_control(), for consistency with the changes to wp_dashboard_cached_rss_widget() in [33183] and [33192].
See #32804, #40702.

git-svn-id: https://develop.svn.wordpress.org/trunk@40802 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 18:59:58 +00:00
Dominik Schilling (ocean90)
83e1634d5e Dashboard: Use get_user_locale() for the news feed cache key.
Since the feed URL can be localized the cache key has to be built with the same locale as the current user is using.

Props iandunn.
Fixes #40417.

git-svn-id: https://develop.svn.wordpress.org/trunk@40793 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 14:35:03 +00:00
Andrew Ozz
b4d8b4db61 Dashboard: Improve the handling of locations determined by geolocating the IP address and by entering a city name. Fix couple of edge cases, and some names.
Props iandunn coreymckrill.
Fixes #40702.

git-svn-id: https://develop.svn.wordpress.org/trunk@40790 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 05:48:01 +00:00
Andrew Ozz
4385a4ff2e Dashboard:
- Close the form after obtaining a valid location.
- Fix focusing the toggle button after closing the form.
- Fix aria attribute values.
- Fix positions in IE11.
- Some JS and CSS cleanup.

Props afercia, coreymckrill.
Fixes #40735.

git-svn-id: https://develop.svn.wordpress.org/trunk@40789 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 04:00:32 +00:00
Konstantin Obenland
0a15718b87 Dashboard: Properly localize data for events
Moves localization to script-loader and removes dependency for two strings.

Props dd32, iandunn.
See #40702.


git-svn-id: https://develop.svn.wordpress.org/trunk@40776 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 14:33:04 +00:00
Konstantin Obenland
f3940bf771 Dashboard: Persist location for community events
Fixes a bug where cached events & location data was not accessible because the
cache key could not be regenerated without latitude and longitude information.

Discovered and fixed during #wcber contributor day.

Props soean, kubik-rubik, obenland.
See #40702.
 


git-svn-id: https://develop.svn.wordpress.org/trunk@40651 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-12 15:52:09 +00:00
Andrea Fercia
bf4b384fd4 Accessibility: Add "(opens in a new window)" screen reader text to the "News-Nearby Events" dashboard widget footer links.
- standardizes similar messages in core to always use `(opens in a new window)`
- adds translators comments
- hides the dashicons with `aria-hidden="true"`, see #40428

Fixes #40733.


git-svn-id: https://develop.svn.wordpress.org/trunk@40643 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-11 22:46:59 +00:00
Andrew Ozz
be2a26ab08 Dashboard: Update the existing WordPress News dashboard widget to also include upcoming meetup events and WordCamps near the current user’s location.
Props @afercia, @andreamiddleton, @azaozz, @camikaos, @coreymckrill, @chanthaboune, @courtneypk, @dd32, @iandunn, @iseulde, @mapk, @mayukojpn, @melchoyce, @nao, @obenland, @pento, @samuelsidler, @stephdau, @tellyworth.
See #40702.

git-svn-id: https://develop.svn.wordpress.org/trunk@40607 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-10 20:03:01 +00:00
Andrea Fercia
5d027d64fd Widgets: Improve the News dashboard widget no-js notice.
In the rare case this notice was displayed, it was unstyled. Uses the notice 
error style to make it prettier and consistent with other no-js notices.
Also, some CSS clean-up.

Fixes #40529.


git-svn-id: https://develop.svn.wordpress.org/trunk@40556 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-25 16:41:26 +00:00
Pascal Birchler
f44a9eba4e Upgrade/Install: Introduce wp_disallow_file_mods() helper function.
This is a wrapper around the checks for the `DISALLOW_FILE_MODS` constant to determine whether file modifications are disallowed.

Props MaximeCulea.
Fixes #38673.


git-svn-id: https://develop.svn.wordpress.org/trunk@40394 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-07 14:35:39 +00:00
Felix Arntz
60f3612684 Multisite: Do not check for is_super_admin() when trying to set user settings.
The checks were introduced in [22256] to prevent user settings to be set for super admins that were not a member of the current site. However the latter should apply to any kind of user, so the `is_super_admin()` check is redundant. Furthermore, removing these checks is necessary for the ongoing effort to get rid of `is_super_admin()` checks in general.

Props chandrapatel for initial patch.
Fixes #39199. See #37616.


git-svn-id: https://develop.svn.wordpress.org/trunk@39932 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-20 17:32:13 +00:00
John Blackbourn
347040745d I18n: Introduce more translator comments for strings that contain placeholders but don't have an accompanying translator comment.
See #38882


git-svn-id: https://develop.svn.wordpress.org/trunk@39326 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-21 02:45:53 +00:00
Pascal Birchler
4225b1655e Dashboard: Do not show 'Popular Plugin' UI if DISALLOW_FILE_MODS is set.
Props Mte90.
Fixes #37436.

git-svn-id: https://develop.svn.wordpress.org/trunk@38825 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-19 08:43:55 +00:00
Pascal Birchler
f231e7233d I18N: Introduce a user-specific language setting.
By enabling the user to select their preferred locale when editing the profile, we allow for greater personalization of the WordPress admin and therefore a better user experience.

The back end will be displayed in the user's individual locale while the locale used on the front end equals the one set for the whole site. If the user didn't specify a locale, the site's locale will be used as a fallback. The new `locale` property of the `WP_User` class can be used to retrieve the user's locale setting.

Props ocean90, ipm-frommen, swissspidy.
Fixes #29783.

git-svn-id: https://develop.svn.wordpress.org/trunk@38705 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-03 07:03:41 +00:00
Andrea Fercia
ee7f970ffa Administration: Improve the usage of the button CSS classes.
Introduces some consistency in the usage of the button CSS classes, fixes the
focus style for accessibility and responsiveness of the buttons.

- Adds the `button` class to all primary buttons make them responsive
- Removes all `secondary-button` classes and replaces it with button when needed. `button-secondary` shouldn't be used and exists just for backward compatibility reasons
- Replaces classes inside `submit_button()` with a shorthand for some buttons, and use an empty string for the default `button` class. Passing `button` is unnecessary
- Adjusts `get_submit_button()` to remove empty items

Props iseulde, dimchik, chris_d2d, mhowell, afercia.
Fixes #27314, #37138, #37448.


git-svn-id: https://develop.svn.wordpress.org/trunk@38672 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-28 19:53:07 +00:00
Scott Taylor
1825eff382 General: use get_bloginfo( 'version' ) instead of global $wp_version in several locations - excluding those locations which reload version.php mid-flight.
See #37699.


git-svn-id: https://develop.svn.wordpress.org/trunk@38459 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 05:48:49 +00:00
Andrea Fercia
dd8591044a Accessibility: Hide the "No activity yet" smiley from assistive technologies.
Fixes #37511.


git-svn-id: https://develop.svn.wordpress.org/trunk@38448 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-30 16:13:31 +00:00
Scott Taylor
3aee745492 AJAX: add a new function, wp_doing_ajax(), which can replace... (wait for it...) DOING_AJAX checks via the constant.
Props Mte90, sebastian.pisula, swissspidy.
Fixes #25669.


git-svn-id: https://develop.svn.wordpress.org/trunk@38334 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 14:32:18 +00:00
Drew Jaynes
5cf0ef170a Docs: Standardize capitalization of Ajax throughout core documentation per the core spelling guide.
Ajax, while considered an acronym for Asynchronous JavaScript and XML, is most commonly capitalized only in the first character.

Part props ocean90.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@38028 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-10 00:50:21 +00:00
Dominik Schilling
d9de76e2a7 Dashboard: Don't add a "Configure" link to the toggle button.
The HTML for the toggle gets appended to the widget name which is later used for the widget title and the screen reader text of the toggle button. Storing the original widget name in the arguments allows us to use the name without the HTML for the screen reader text and doesn't require further changes by plugin developers.

Props nicholas_io, swissspidy.
Fixes #35021.

git-svn-id: https://develop.svn.wordpress.org/trunk@37972 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-05 15:21:44 +00:00
Peter Wilson
db0195c936 DOCS: Replace HTTP links with HTTPS.
Replaces unsecure links in documentation and translator comments with their secure versions.

Props johnpgreen, netweb

Fixes #36993


git-svn-id: https://develop.svn.wordpress.org/trunk@37674 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-10 04:49:09 +00:00
Drew Jaynes
2111185ab9 Docs: Apply inline @see tags to hooks referenced in DocBlocks for wp-admin/* files.
Applying these specially-crafted `@see` tags allows the Code Reference parser to recognize and link these elements as actions and filters.

See #36921.


git-svn-id: https://develop.svn.wordpress.org/trunk@37537 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-23 17:27:19 +00:00
Drew Jaynes
1cd420af5e Docs: Standardize hook docs in wp-admin/* to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37488 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:00:23 +00:00
Sergey Biryukov
8d99819276 Dashboard: Display the comment counts in wp_dashboard_right_now() in the rare initial condition when there are 0 approved comments and only pending comments, so the AJAX count update could work.
Props afercia.
Fixes #35519.

git-svn-id: https://develop.svn.wordpress.org/trunk@37335 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-01 11:05:48 +00:00
Scott Taylor
e2b9072267 Dashboard: toggle the "View" link for comments when Approving / Unapproving from the Dashboard widget.
Fixes #35518.


git-svn-id: https://develop.svn.wordpress.org/trunk@37302 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-22 21:29:19 +00:00
Andrea Fercia
2a2539402f Accessibility: Improve accessibility for the Plugin details modal.
The plugin details modal can be invoked from several screens. There's now a new
`.open-plugin-details-modal` CSS class to be used in combination with the
`.thickbox` CSS class that adds everything needed for accessibility.

- Adds an ARIA role `dialog` and an `aria-label` attribute to the modal
- Adds a `title` attribute to the iframe inside the modal
- Constrains tabbing within the modal
- Restores focus back in a proper place when closing the modal

Also, improves a bit the native Thickbox implementation: it should probably be
replaced with some more modern tool but at least keyboard focus should be moved
inside the modal.

Fixes #33305.

git-svn-id: https://develop.svn.wordpress.org/trunk@36964 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-10 22:36:25 +00:00
Drew Jaynes
6012464446 Docs: Add a missing @since version to the DocBlock for wp_add_dashboard_widget().
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@36878 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-07 22:16:56 +00:00
Sergey Biryukov
74da332c40 Docs: Add wp_add_dashboard_widget() parameter descriptions.
Props meitar for initial patch.
Fixes #36092.

git-svn-id: https://develop.svn.wordpress.org/trunk@36868 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-06 12:07:34 +00:00
Drew Jaynes
d81a852b48 Docs: Add a more descriptive changelog entry to the hook doc for the privacy_on_link_title filter.
See #35049. See #35986.


git-svn-id: https://develop.svn.wordpress.org/trunk@36823 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-03 08:55:06 +00:00
Sergey Biryukov
83b69ceb02 I18N: Remove HTML tags from translatable string in wp-admin/includes/dashboard.php.
Props ramiy, SergeyBiryukov.
Fixes #36013.

git-svn-id: https://develop.svn.wordpress.org/trunk@36793 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-01 01:38:28 +00:00
Andrea Fercia
a19426f36a Comments: Add missing placeholder for printf() after [36683].
Fixes #35392.

git-svn-id: https://develop.svn.wordpress.org/trunk@36767 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-28 21:38:33 +00:00
Andrea Fercia
52c7d7581e Accessibility: improve accessibility of the Dashboard "Recent Comments" widget.
- Makes the list of comments a list
- Always displays the title of the post the comment relates to, linked to the post itself and no more to the Edit screen
- Headings: changes the visible one in "Recent Comments" and adds a hidden "View more comments" heading before the views links
- Adds the pending status indicator to Pingbacks and Trackbacks

Props rachelbaker, afercia.

Fixes #35392.

git-svn-id: https://develop.svn.wordpress.org/trunk@36683 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 16:06:05 +00:00
Drew Jaynes
9f52463206 Docs: Add more complete information to DocBlocks for private core functions _wp_dashboard_control_callback() and _wp_dashboard_recent_comments_row().
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@36474 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-03 20:19:31 +00:00
John Blackbourn
ba5f0fdc7b Docs: Various docblock corrections.
See #32246


git-svn-id: https://develop.svn.wordpress.org/trunk@36250 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-10 01:25:44 +00:00
Andrea Fercia
0eba218570 Accessibility: Remove title attributes from the Admin Dashboard.
Uses `aria-label` and `screen-reader-text` where appropriate. Also removes
the default title attribute output by `privacy_on_link_title`, preserving
the ability to use the filter.

Fixes #35049.

git-svn-id: https://develop.svn.wordpress.org/trunk@36172 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-05 14:18:57 +00:00
Sergey Biryukov
f5d2251f50 List tables: After [34006], remove unnecessary context from 'View' string, for consistency with other strings in the same context.
Props MikeHansenMe, subharanjan.
Fixes #34914.

git-svn-id: https://develop.svn.wordpress.org/trunk@35900 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-13 18:36:22 +00:00
Pascal Birchler
4e58589669 Docs: Fix some minor DocBlock alignment issues.
See #32246.

git-svn-id: https://develop.svn.wordpress.org/trunk@35885 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-12 15:36:36 +00:00
Pascal Birchler
64b89c09f0 Dashboard: Do not show "Search Engines Discouraged" text when the blog_public option is not set.
Search engines are only discouraged from indexing the site when the option is explicitly set to `0`.

Fixes #34860.

git-svn-id: https://develop.svn.wordpress.org/trunk@35873 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-11 22:02:27 +00:00
Ella Iseulde Van Dorpe
14c3f3c871 Make date format consistent across the admin
The 'date_format' and 'time_format' options shouldn't affect the backend.

See #30864



git-svn-id: https://develop.svn.wordpress.org/trunk@35811 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-07 04:25:53 +00:00
Sergey Biryukov
4c7f6dfad3 Don't use <a> in translatable strings in `wp-admin/includes/dashboard.php'.
Add translator commments.

Props ramiy.
Fixes #34501.

git-svn-id: https://develop.svn.wordpress.org/trunk@35443 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-30 01:32:17 +00:00
Scott Taylor
83f90bf851 Dashboard: make tags used for headings more semantic.
Props Cheffheid, afercia.
Fixes #33558.


git-svn-id: https://develop.svn.wordpress.org/trunk@35414 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-28 17:56:22 +00:00
Scott Taylor
eb6bdb59cd Dashboard: use the create_posts cap on the post type object when determining if the Quick Press widget can be displayed.
Props jim912, ocean90, chriscct7.
Fixes #25681.


git-svn-id: https://develop.svn.wordpress.org/trunk@35282 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 05:48:11 +00:00
Drew Jaynes
aacde02ed4 Docs: Fix some minor formatting in the $query_args parameter description for the `` filter doc.
See #8243. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@35004 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-10 06:38:24 +00:00
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
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
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
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
John Blackbourn
1bb2876fe6 callback is not a valid type in PHP, PSR-5, or phpDocumentor. callable should be used instead.
Fixes #34032


git-svn-id: https://develop.svn.wordpress.org/trunk@34566 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-25 23:57:46 +00:00
Drew Jaynes
ea23f4603c Docs: Fix the syntax for a mid-file sectional comment in wp-admin/includes/dashboard.php.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34565 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-25 22:50:58 +00:00