Commit Graph

82 Commits

Author SHA1 Message Date
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
Konstantin Obenland
8c82515ab6 Update/Install: Shiny Updates v2.
Gone are the days of isolation and feelings of "meh", brought on by The Bleak Screen of Sadness. For a shiny knight has arrived to usher our plugins and themes along their arduous journey of installation, updates, and the inevitable fate of ultimate deletion.

Props swissspidy, adamsilverstein, mapk, afragen, ocean90, ryelle, j-falk, michael-arestad, melchoyce, DrewAPicture, AdamSoucie, ethitter, pento, dd32, kraftbj, Ipstenu, jorbin, afercia, stephdau, paulwilde, jipmoors, khag7, svovaf, jipmoors, obenland.
Fixes #22029, #25828, #31002, #31529, #31530, #31773, #33637, #35032.


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


git-svn-id: http://core.svn.wordpress.org/trunk@37680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-15 16:37:29 +00:00
Jeremy Felt
6279ca91de Multisite: Introduce WP_Theme methods to network enable/disable themes.
* `WP_Theme::network_enable_theme()` can be used to enable a theme or array of themes on a network.
* `WP_Theme::network_disable_theme()` can be used to disable a theme or array of themes on a network.
* Use these new methods in the network admin vs direct `update_site_option()` calls.
* Add tests.

Props igmoweb.
Fixes #30594.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37168 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-14 03:40:27 +00:00
Sergey Biryukov
6cf7973221 I18N: Remove HTML tags from translatable strings in wp-admin/network/themes.php.
Props ramiy.
Fixes #35988.
Built from https://develop.svn.wordpress.org/trunk@36770


git-svn-id: http://core.svn.wordpress.org/trunk@36737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-29 02:38:26 +00:00
Pascal Birchler
81e9462ca3 Themes: Improve error messages for broken themes.
Props mayukojpn for initial patch.
Fixes #35286.
Built from https://develop.svn.wordpress.org/trunk@36638


git-svn-id: http://core.svn.wordpress.org/trunk@36605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 17:20:27 +00:00
Pascal Birchler
aaa11d6207 Allow searching for 0 throughout the admin.
Fixes #31025.
Built from https://develop.svn.wordpress.org/trunk@36302


git-svn-id: http://core.svn.wordpress.org/trunk@36269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 20:06:25 +00:00
Pascal Birchler
333bdb535a Remove unused variables after [35995] and [35996].
See #34439.
Built from https://develop.svn.wordpress.org/trunk@35997


git-svn-id: http://core.svn.wordpress.org/trunk@35962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-17 18:41:27 +00:00
Pascal Birchler
51bb4db622 Network Admin: Remove the list of files which will be deleted when deleting a theme.
Fixes #34439.
Built from https://develop.svn.wordpress.org/trunk@35996


git-svn-id: http://core.svn.wordpress.org/trunk@35961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-17 18:35:26 +00:00
Jeremy Felt
9926983b66 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-07 17:11:25 +00:00
Scott Taylor
0c2b2a0e3d 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-07 01:28:25 +00:00
Jeremy Felt
54512d64cb 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 19:08:26 +00:00
Scott Taylor
ef87172270 foreach is a statement, not a function.
See #33491.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-25 20:28:22 +00:00
Sergey Biryukov
ddff6fe471 Don't capitalize words in a sentence after comma.
props bjornjohansen, netweb.
fixes #31927.
Built from https://develop.svn.wordpress.org/trunk@33079


git-svn-id: http://core.svn.wordpress.org/trunk@33050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-04 00:50:25 +00:00
Konstantin Obenland
bd974d7bf2 Use a less element-specific class name for links within page titles.
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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@33038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-03 16:42: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
Sergey Biryukov
36643388ef Decouple strings where the singular and plural form are not just the same string with different numbers, but essentially two different strings.
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.
Built from https://develop.svn.wordpress.org/trunk@31941


git-svn-id: http://core.svn.wordpress.org/trunk@31920 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-31 18:45:28 +00:00
Dominik Schilling
13ad2d4e16 Screen Options: Improve items per page option label.
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.
Built from https://develop.svn.wordpress.org/trunk@31696


git-svn-id: http://core.svn.wordpress.org/trunk@31677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-10 15:32:27 +00:00
Scott Taylor
0ec87e4584 There are a few functions that have the ability to return false instead of a string, so the return value should be checked before being passed to functions that expect string.
These are trivial, but they clear out some Scrutinizer issues.

See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-09 02:11:28 +00:00
Scott Taylor
7f8b548df1 In HTML5, the action attribute is no longer required. Remove this attribute when empty.
The admin HTML is served with the HTML5 doctype.

"The action and formaction content attributes, if specified, must have a value that is a valid non-empty URL potentially surrounded by spaces." 
http://www.w3.org/html/wg/drafts/html/master/forms.html#attr-fs-action

Props voldemortensen.
Fixes #30126.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 04:16:24 +00:00
Dominik Schilling
57c41263d7 Language packs: Remove translations when deleting a theme or a plugin.
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.
Built from https://develop.svn.wordpress.org/trunk@29856


git-svn-id: http://core.svn.wordpress.org/trunk@29619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-08 19:05:20 +00:00
Sergey Biryukov
53642c5d16 Network Admin: Properly check if the theme is active on the main site to avoid deleting it via bulk actions.
props ocean90.
fixes #29861.
Built from https://develop.svn.wordpress.org/trunk@29839


git-svn-id: http://core.svn.wordpress.org/trunk@29603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-05 20:37:17 +00:00
Scott Taylor
64418c0192 In wp-admin/network/themes.php, break is unreachabled after exit.
See #27882.


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


git-svn-id: http://core.svn.wordpress.org/trunk@28136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-06 18:08:14 +00:00
Andrew Nacin
dce0b9adea Use SSL when linking to WordPress.org. see #27115.
Built from https://develop.svn.wordpress.org/trunk@27469


git-svn-id: http://core.svn.wordpress.org/trunk@27314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-08 04:14:15 +00:00
Andrew Nacin
df48cebeb4 No-JavaScript and no-Customizer support for the new Themes screen.
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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-06 16:11:10 +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
Mark Jaquith
211a3eec8b Keep the theme update thickbox from being obscured by the toolbar.
props ParadisePorridge, SergeyBiryukov. fixes #23984.

git-svn-id: http://core.svn.wordpress.org/trunk@24558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-05 15:15:58 +00:00
Dion Hulse
434aef8e89 Fix Bulk Theme Deletion in the Network Admin when using FTP. Props kobenland. Fixes #20671
git-svn-id: http://core.svn.wordpress.org/trunk@22084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-29 01:36:14 +00:00
nacin
9d20dfc4e1 Enforce multisite plugins menu preference in map_meta_cap(). This means a simple current_user_can('activate_plugins') check will handle the 'Enable administration menus' setting.
Remove bogus checks for enabling/disabling the 'themes' menu (something core does not handle out of the box) when in the network admin.

fixes #21123.



git-svn-id: http://core.svn.wordpress.org/trunk@21198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-30 12:40:25 +00:00
ryan
bbb1494919 Use the stylesheet rather than the template to create the network enable theme nonce. Fix network enable redirect following theme installation. Props duck_, nacin. fixes #20916
git-svn-id: http://core.svn.wordpress.org/trunk@21062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-12 15:31:25 +00:00
nacin
7bac1174bf In multisite, list broken themes on network/themes.php instead of on individual Manage Themes pages. see #20103.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-08 07:32:42 +00:00
nacin
6321f9060c Use wp_get_theme() rather than get_theme_data() in the verify theme deletion (multisite network) screen. see #20103.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-29 07:50:56 +00:00
ryan
616c35e71c One newline is enough.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-05 20:10:39 +00:00
ryan
02a1dd7ccb Best practice, use wp_safe_redirect() when dealing with referrers. Props nacin.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-10 18:26:48 +00:00
ryan
9d03183e6d Pinking shears
git-svn-id: http://svn.automattic.com/wordpress/trunk@19577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-08 23:02:33 +00:00
ryan
8ace5a6b4c Use WP_Screen::add_help_tab(). see #19020
git-svn-id: http://svn.automattic.com/wordpress/trunk@19514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-01 02:22:07 +00:00
nacin
cece838d8f More s/add_help_sidebar/set_help_sidebar/. fixes #19020.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-11-02 21:32:16 +00:00
ryan
366db8c10b Use add_help_sidebar(). see #19020
git-svn-id: http://svn.automattic.com/wordpress/trunk@19114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-11-02 05:33:53 +00:00
nacin
795ca8d394 Revert [18861], [18862], [18864], [18874], [18879], and [18880]. see #18785.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-07 04:57:12 +00:00
ryan
435b3a0177 Implement bulk update for network/themes.php. Props ocean90. fixes #18687
git-svn-id: http://svn.automattic.com/wordpress/trunk@18869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-03 14:35:43 +00:00
azaozz
bbafdfa0e5 Use add_option() method, introduce add_option_context() method for adding specific text above the screen options, see #18690
git-svn-id: http://svn.automattic.com/wordpress/trunk@18867 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-03 04:00:57 +00:00
azaozz
3575537e5f Add screen_options with contextual content, see #18690
git-svn-id: http://svn.automattic.com/wordpress/trunk@18864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-02 06:59:36 +00:00
nacin
0fe8ea2f72 Add 'Network Enable' link after installing a theme in the network admin. props PeteMall, fixes #18468.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-08-18 22:40:37 +00:00
westi
1443193079 Help Tab text updatates. Fixes #17312 prop dougwrites.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-06-01 15:37:04 +00:00
markjaquith
0e57bd3a37 Centralize pagination bound exceeding redirects for list tables. props garyc40. props johnjamesjacoby. fixes #16208
git-svn-id: http://svn.automattic.com/wordpress/trunk@17900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-05-12 06:09:42 +00:00
koopersmith
2207bfe689 Admin Header 2: The Return of 32px Icons. Props, iammattthomas. see #17324.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17872 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-05-12 00:22:22 +00:00
ryan
e5ec44416a Remove favorite_actions() from h2s. Restore Add New buttons. see #17324
git-svn-id: http://svn.automattic.com/wordpress/trunk@17849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-05-10 19:18:16 +00:00
markjaquith
8d87f5dcb4 Big UI style update. props koopersmith. see #17324
git-svn-id: http://svn.automattic.com/wordpress/trunk@17800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-05-04 20:15:05 +00:00