Commit Graph

168 Commits

Author SHA1 Message Date
Andrea Fercia
d65a038ca3 Accessibility: Remove target=_blank from the Plugins, Themes, Media, Update, and Tools screens help tabs links.
Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38215. See #23432.

Built from https://develop.svn.wordpress.org/trunk@38722


git-svn-id: http://core.svn.wordpress.org/trunk@38665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-04 07:08:29 +00:00
Pascal Birchler
4a88d55054 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.
Built from https://develop.svn.wordpress.org/trunk@38705


git-svn-id: http://core.svn.wordpress.org/trunk@38648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-03 07:04:29 +00:00
Andrea Fercia
eeefec932f 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.

Built from https://develop.svn.wordpress.org/trunk@38672


git-svn-id: http://core.svn.wordpress.org/trunk@38615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-28 19:54:28 +00:00
Scott Taylor
9383bf8f74 General: use get_bloginfo( 'version' ) instead of global $wp_version in several locations - excluding those locations which reload version.php mid-flight.
See #37699.

Built from https://develop.svn.wordpress.org/trunk@38459


git-svn-id: http://core.svn.wordpress.org/trunk@38400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 05:49:37 +00:00
John Blackbourn
dbdc1c28b1 I18N: Correct various instances of incorrect usage of esc_attr_e().
Fixes #37457
Props henry.wright, afercia

Built from https://develop.svn.wordpress.org/trunk@38424


git-svn-id: http://core.svn.wordpress.org/trunk@38365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 18:06:30 +00:00
Dominik Schilling
25e66e4f1e Text Changes: Unify permission error messages.
The new format looks like "Sorry, you are not allowed to <action>.". This provides a consistent experience for all error messages related to missing permissions. It also reduces the number of similar strings and allows translators to provide a consistent style in their language.

Props ramiy, Presskopp.
Fixes #34521.
Built from https://develop.svn.wordpress.org/trunk@37914


git-svn-id: http://core.svn.wordpress.org/trunk@37855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-29 15:16:29 +00:00
Andrea Fercia
d01b200e6e Accessibility: Help text improvements.
Avoid references to "visual" positions in favour of positions in the document
structure. The help text shouldn't assume users can see.

Also, in the Posts screen don't mention specific types of posts and use a more
generic text instead.

Props odysseygate, pansotdev, zakb8.
Fixes #34761.
Built from https://develop.svn.wordpress.org/trunk@37680


git-svn-id: http://core.svn.wordpress.org/trunk@37646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-10 21:43:29 +00:00
Peter Wilson
47d26cd9fb DOCS: Replace HTTP links with HTTPS.
Replaces unsecure links in documentation and translator comments with their secure versions.

Props johnpgreen, netweb

Fixes #36993

Built from https://develop.svn.wordpress.org/trunk@37674


git-svn-id: http://core.svn.wordpress.org/trunk@37640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-10 04:50:33 +00:00
Drew Jaynes
c3055cc190 Docs: Standardize hook docs in wp-admin/* to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.

Built from https://develop.svn.wordpress.org/trunk@37488


git-svn-id: http://core.svn.wordpress.org/trunk@37456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-22 18:01:30 +00:00
Sergey Biryukov
6d91caa931 Theme Editor: Repurpose the 'wp_theme_editor_filetypes' filter added in [35134] to actually filter file types instead of files.
Default types include 'php' and 'css' and cannot be removed, only new types can be added.

Props DrewAPicture, SergeyBiryukov.
Fixes #22924.
Built from https://develop.svn.wordpress.org/trunk@35180


git-svn-id: http://core.svn.wordpress.org/trunk@35146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-15 02:20:24 +00:00
Scott Taylor
7c88e86bf6 Theme Editor: add a filter, wp_theme_editor_filetypes, to allow more filetypes to be edited via the Theme Editor. Usage of the Theme Editor is strenuously discouraged, but we should allow you to add whatever filetypes (.less, .scss) you would like.
Props MikeHansenMe, pross.
Fixes #22924.

Built from https://develop.svn.wordpress.org/trunk@35134


git-svn-id: http://core.svn.wordpress.org/trunk@35099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-13 14:14:24 +00:00
John Blackbourn
815635548a Switch the remaining user-facing links to wordpress.org over to HTTPS.
Fixes #27115

Built from https://develop.svn.wordpress.org/trunk@34783


git-svn-id: http://core.svn.wordpress.org/trunk@34748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 22:46:28 +00:00
Scott Taylor
8bb4c2c2e9 Theme Editor: ensure that files named index.php in theme subfolders are not labeled as "Main Index Template"
Props MikeHansenMe, wonderboymusic, bravokeyl, Shelob9.
Fixes #27201.

Built from https://develop.svn.wordpress.org/trunk@34658


git-svn-id: http://core.svn.wordpress.org/trunk@34622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-28 03:11:24 +00:00
Andrea Fercia
f446d01b4c Bump H3 headings to H2 on the Theme Editor screen for better accessibility.
Props mrahmadawais.
Fixes #33660.
Built from https://develop.svn.wordpress.org/trunk@34066


git-svn-id: http://core.svn.wordpress.org/trunk@34034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 00:00:24 +00:00
Konstantin Obenland
7dc1d06e64 Proper heading for admin screens.
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.


Built from https://develop.svn.wordpress.org/trunk@32974


git-svn-id: http://core.svn.wordpress.org/trunk@32945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-27 15:41:25 +00:00
Dominik Schilling
64fc7294b6 Use HTTPS URLs for codex.wordpress.org.
see #27115.
Built from https://develop.svn.wordpress.org/trunk@32116


git-svn-id: http://core.svn.wordpress.org/trunk@32095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-12 21:29:32 +00:00
Helen Hou-Sandí
d85f8fe326 Admin notices: Make (most) core notices dismissible.
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.

Built from https://develop.svn.wordpress.org/trunk@31973


git-svn-id: http://core.svn.wordpress.org/trunk@31952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-01 22:06:28 +00:00
Andrew Ozz
321b551650 Fix focusing in the plugin and theme editors. Update the help.
Props afercia, Cheffheid. Fixes #31415.
Built from https://develop.svn.wordpress.org/trunk@31908


git-svn-id: http://core.svn.wordpress.org/trunk@31887 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-26 22:35:27 +00:00
Scott Taylor
af0e5cc851 Inline <script>s that are only printed in the admin for pages that are served with the HTML5 doctype absolutely do not need CDATA comments.
Props tw2113 for the initial patch.
See #18788.

Built from https://develop.svn.wordpress.org/trunk@31034


git-svn-id: http://core.svn.wordpress.org/trunk@31015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-03 05:46:25 +00:00
Drew Jaynes
097dc8ee15 Fix syntax for single- and multi-line comments in wp-admin-directory files.
See #28931.

Built from https://develop.svn.wordpress.org/trunk@29206


git-svn-id: http://core.svn.wordpress.org/trunk@28990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-17 09:14:16 +00:00
Scott Taylor
2f513d3320 Fix some hackificator odds and ends in wp-admin:
* `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.

Built from https://develop.svn.wordpress.org/trunk@28500


git-svn-id: http://core.svn.wordpress.org/trunk@28326 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 05:04:16 +00:00
Scott Taylor
e9bb9c0f12 In wp-admin/theme-editor.php, break is unreachabled after exit.
See #27882.

Built from https://develop.svn.wordpress.org/trunk@28313


git-svn-id: http://core.svn.wordpress.org/trunk@28141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-06 18:16:26 +00:00
Andrew Nacin
0c16c0477b Reference https://wordpress.org rather than http://wordpress.org in strings, links, comments, etc.
props Ipstenu, markjaquith.
see #27115.

Built from https://develop.svn.wordpress.org/trunk@27369


git-svn-id: http://core.svn.wordpress.org/trunk@27219 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-03 02:34:27 +00:00
Andrew Ozz
8d6059b383 Remove all screen_icon() calls and deprecate the functions, props TobiasBg, fixes #26119
Built from https://develop.svn.wordpress.org/trunk@26518


git-svn-id: http://core.svn.wordpress.org/trunk@26411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-02 03:53:11 +00:00
Andrew Nacin
fd57b239d2 Don't rely on include_path to include files.
Always use dirname() or, once available, ABSPATH.

props ketwaroo, hakre.
fixes #17092.

Built from https://develop.svn.wordpress.org/trunk@25616


git-svn-id: http://core.svn.wordpress.org/trunk@25533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-25 00:18:11 +00:00
Sergey Biryukov
5ab3d3bf54 Remove redundant context for Child Themes link. fixes #25079.
Built from https://develop.svn.wordpress.org/trunk@25099


git-svn-id: http://core.svn.wordpress.org/trunk@25081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-23 00:31:10 +00:00
Sergey Biryukov
57c10eadbb Use ellipsis instead of three dots. props tjsingleton, jordie23, wojtek.szkutnik, DrewAPicture, SergeyBiryukov. see #8714.
git-svn-id: http://core.svn.wordpress.org/trunk@24207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-08 21:27:31 +00:00
Andrew Nacin
b96c604833 Don't unslash variables that came from wp_reset_vars(). see #21767.
git-svn-id: http://core.svn.wordpress.org/trunk@23580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 18:59:54 +00:00
Ryan Boren
f3a83744e9 Use wp_unslash() instead of stripslashes() and stripslashes_deep(). Use wp_slash() instead of add_magic_quotes().
git-svn-id: http://core.svn.wordpress.org/trunk@23567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 17:14:09 +00:00
Ryan Boren
43a7e695e9 Revert 23416, 23419, 23445 except for wp_reset_vars() changes. We are going a different direction with the slashing cleanup, so resetting to a clean slate. see #21767
git-svn-id: http://core.svn.wordpress.org/trunk@23554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 16:28:40 +00:00
Andrew Nacin
12c4b9bae9 Do not unslash variables reset by wp_reset_vars(). Remove variables that have never been used in plugin-editor.php. see #21767.
git-svn-id: http://core.svn.wordpress.org/trunk@23419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-15 02:01:36 +00:00
Ryan Boren
cc5ed3a485 Change all core API to expect unslashed rather than slashed arguments.
The exceptions to this are update_post_meta() and add_post_meta() which are often used by plugins in POST handlers and will continue accepting slashed data for now.

Introduce wp_upate_post_meta() and wp_add_post_meta() as unslashed alternatives to update_post_meta() and add_post_meta(). These functions could become methods in WP_Post so don't use them too heavily yet.

Remove all escape() calls from wp_xmlrpc_server. Now that core expects unslashed data this is no longer needed.

Remove addslashes(), addslashes_gpc(), add_magic_quotes() calls on data being prepared for handoff to core functions that until now expected slashed data. Adding slashes in no longer necessary.

Introduce wp_unslash() and use to it remove slashes from GPCS data before using it in core API. Almost every instance of stripslashes() in core should now be wp_unslash(). In the future (a release or three) when GPCS is no longer slashed, wp_unslash() will stop stripping slashes and simply return what is passed. At this point wp_unslash() calls can be removed from core.

Introduce wp_slash() for slashing GPCS data. This will also turn into a noop once GPCS is no longer slashed. wp_slash() should almost never be used. It is mainly of use in unit tests.

Plugins should use wp_unslash() on data being passed to core API.

Plugins should no longer slash data being passed to core. So when you get_post() and then wp_insert_post() the post data from get_post() no longer needs addslashes(). Most plugins were not bothering with this. They will magically start doing the right thing. Unfortunately, those few souls who did it properly will now have to avoid calling addslashes() for 3.6 and newer.

Use wp_kses_post() and wp_kses_data(), which expect unslashed data, instead of wp_filter_post_kses() and wp_filter_kses(), which expect slashed data. Filters are no longer passed slashed data.

Remove many no longer necessary calls to $wpdb->escape() and esc_sql().

In wp_get_referer() and wp_get_original_referer(), return unslashed data.

Remove old stripslashes() calls from WP_Widget::update() handlers. These haven't been necessary since WP_Widget.

Switch several queries over to prepare().

Expect something to break.

Props alexkingorg
see #21767


git-svn-id: http://core.svn.wordpress.org/trunk@23416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-14 22:51:06 +00:00
Mark Jaquith
da5c7a7c62 "Lookup" is a noun. "Look up" is the verb form. If you doubt me, you should have lookuped in a dictionary.
props johnbillion, SergeyBiryukov. fixes #22386

git-svn-id: http://core.svn.wordpress.org/trunk@23393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-08 16:19:04 +00:00
Andrew Nacin
fb36abe6b7 Always URL-encode a stylesheet directory value before using it in a URL. These situations are saved by wp_nonce_url(), but we should not depend on that. see #21749, for trunk only.
git-svn-id: http://core.svn.wordpress.org/trunk@21755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-04 22:35:12 +00:00
azaozz
67d4a5f71a Move the description for tabbing out of the plugin and theme editors textareas to the Help tab, fixes #21347
git-svn-id: http://core.svn.wordpress.org/trunk@21358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-27 16:49:48 +00:00
azaozz
34535097b7 Remove nearly all tabindex attributes from the admin, leaving them only where absolutely necessary (for now that's only the toolbar).
Add tabindex="-1" for the menu images links to avoid double tab stops there when the menu is expanded.

Fix/add auto-focus on the first input fields on the Add/Edit Post, all taxonomy, all edit taxonomy, Log In and Edit Comment screens.

See #21340.

git-svn-id: http://core.svn.wordpress.org/trunk@21311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-24 00:15:15 +00:00
azaozz
6d556cbcdb Make it possible to tab out of the plugin and theme editors textareas by pressing Esc followed by Tab, fixes #21347
git-svn-id: http://core.svn.wordpress.org/trunk@21310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-23 23:46:27 +00:00
ryan
b66fb16fe5 Show the template name instead of just the filename. Props arieputranto, SergeyBiryukov. fixes #20718
git-svn-id: http://core.svn.wordpress.org/trunk@20844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-22 15:25:35 +00:00
nacin
1e500bd76a Remove WP_Theme::is_child_theme() in favor of WP_Theme::parent(). see #20546.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-25 17:34:19 +00:00
nacin
53bdf5bffc Issue a 'This theme is broken' error (when applicable) on the theme editor. see #20103.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-21 21:23:27 +00:00
nacin
d62b91f228 Adjust [20557] and check only parent(), as it is more semantic. We don't care if the theme considers itself to be a child theme, we care if it has a valid parent. see #20103.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-21 21:03:23 +00:00
nacin
a5a13979bd A child theme with a missing parent might be is_child_theme() but not have a valid parent() object, so we need to check parent() too. see #20103.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-21 21:00:24 +00:00
nacin
f73524c272 Don't allow themes without a style.css editor to be edited. These themes are too broken to be salvaged by the theme editor. see #20103.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-21 20:57:54 +00:00
nacin
789b3714d3 Use WP_Theme::exists(). see #20361.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-06 19:21:31 +00:00
nacin
70aa7f9607 Clear theme cache after editing. Reduce default cache persistence to 1800. (Could go lower.) see #20331.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20328 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-30 14:39:05 +00:00
nacin
5b8037afe6 Always set WP_Theme->template even when there is an error and we have no idea what the template is. (Assume it is the stylesheet.) Prevents a number of issues including WP_Theme->is_child_theme() lying. Tidy the theme editor for broken themes and themes with no templates (PHP files), or no template (parent), or are broken. Allow broken themes to be edited. see #20103.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20315 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-29 04:16:17 +00:00
nacin
107733e263 urldecode() the incoming $file in the theme editor. see [20313] when the encode was added. see #2994 for the original bug report. see #20103.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-29 03:34:51 +00:00
nacin
23abe58a59 Rewrite theme-editor.php to use the new WP_Theme API. see #20103.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20313 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-29 03:00:38 +00:00
ryan
83b131f8e3 User lowercase true, false, null instead of uppercase. Props c3mdigital, mfields. fixes #16302
git-svn-id: http://svn.automattic.com/wordpress/trunk@19687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-05 20:50:54 +00:00
ryan
6bba5a265b Pinking shears
git-svn-id: http://svn.automattic.com/wordpress/trunk@19528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-01 04:51:35 +00:00