Commit Graph

120 Commits

Author SHA1 Message Date
hellofromTonya
f28f9194e2 Code Modernization: Fix dynamic properties in WP_Admin_Bar.
To fix the dynamic properties, the following changes are included:
* Removes `WP_Admin_Bar::__get()`.
* Declares `menu` as a property on the class, deprecates it, and initializes it to an empty array.
* Removes the unused 'proto' dynamic property.

Dynamic (non-explicitly declared) properties are deprecated as of PHP 8.2 and are expected to become a fatal error in PHP 9.0.

== Why remove the `WP_Admin_Bar::__get()` magic method?

tl;dr
The magic method is no longer needed.

The magic method only handled the `menu` and `proto` dynamic properties. Introducing a full set of magic methods is overkill for this class. Instead of having to maintain magic methods, this changeset instead directly addresses the 2 properties (see below).

== Why declare the `menu` property on the class?

tl;dr
To simplify the code while maintaining backwards compatibility for extenders who are using this deprecated property.

The `menu` property was introduced during the 3.1.0 ''development cycle'' as a declared property [15671]. Its purpose was to ''internally'' hold the menu structure.

During the WP 3.3.0 development cycle, it was replaced by a new `private` property called `nodes` (see [19120]).

But breakage reports from extenders caused it to be restored. [19501] added the `__get()` magic method, i.e. for handling it as a dynamic property, and deprecated it.

>We're not going to maintain compat for $menu. Suggest we make it array() and plugins will have to deal. We can throw a _deprecated_argument() and push them to use the new methods.
~ Source: [https://core.trac.wordpress.org/ticket/19371#comment:17 see #19371 comment 17]

[https://wpdirectory.net/search/01GSTW1X69TBN8FH3SY7V8KPY5 A search of the wp.org plugins and themes repository] shows that a few plugins are still using this deprecated property. To maintain backwards compatibility, `menu` is moved back to the class as a declared property, set to an empty array (as it's been since 3.3.0), and deprecated in the property's description.

== Why remove the `proto` dynamic property?

tl;dr
* It was not intended to be released in 3.1.
* There are no usages of it in Core or in the WP.org's plugin or theme directories.
* It should be safe to remove.

This property was first introduced in the WP 3.1.0 ''development cycle'' to replace the `PROTO` constant (see [16038]) for protocol handling for the admin bar's hyperlinks. [16077] replaced the property's usages with URL functions such as `get_admin_url()` and `admin_url()`. But it missed removing the property, which was no longer needed or used.

It was relocated to the `__get()` magic method as a dynamic property when the `menu` property was restored (see [19501]).

A search of WP.org's plugins and themes repositories shows no usages of the property. Core hasn't used it since the removed in [16038] before 3.1 final release. It should be safe to remove it, but committing very early in the 6.3 alpha cycle to give time for reports of usages, if there are any.

References:
* A [https://www.youtube.com/watch?v=vDZWepDQQVE&t=9362s live open public working session] where these changes were discussed and agreed to.
* [https://wiki.php.net/rfc/deprecate_dynamic_properties PHP RFC: Deprecate dynamic properties].

Follow-up to [19501], [19120], [16308], [16038], [15671].

Props antonvlasenko, hellofromTonya, jrf, markjaquith, desrosj, ironprogrammer, peterwilsoncc, SergeyBiryukov.
See #56876, #56034.
Built from https://develop.svn.wordpress.org/trunk@55580


git-svn-id: http://core.svn.wordpress.org/trunk@55092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-21 20:00:19 +00:00
Sergey Biryukov
3ba44120d0 Coding Standards: Always use parentheses when instantiating an object.
Note: This will be enforced by WPCS 3.0.0.

Props jrf.
See #56791.
Built from https://develop.svn.wordpress.org/trunk@54891


git-svn-id: http://core.svn.wordpress.org/trunk@54443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-29 15:51:14 +00:00
Sergey Biryukov
c03305852e Code Modernization: Add AllowDynamicProperties attribute to all (parent) classes.
Dynamic (non-explicitly declared) properties are deprecated as of PHP 8.2 and are expected to become a fatal error in PHP 9.0.

There are a number of ways to mitigate this:
* If it is an accidental typo for a declared property: fix the typo.
* For known properties: declare them on the class.
* For unknown properties: add the magic `__get()`, `__set()`, et al. methods to the class or let the class extend `stdClass` which has highly optimized versions of these magic methods built in.
* For unknown ''use'' of dynamic properties, the `#[AllowDynamicProperties]` attribute can be added to the class. The attribute will automatically be inherited by child classes.

Trac ticket #56034 is open to investigate and handle the third and fourth type of situations, however it has become clear this will need more time and will not be ready in time for WP 6.1.

To reduce “noise” in the meantime, both in the error logs of WP users moving onto PHP 8.2, in the test run logs of WP itself, in test runs of plugins and themes, as well as to prevent duplicate tickets from being opened for the same issue, this commit adds the `#[AllowDynamicProperties]` attribute to all “parent” classes in WP.

The logic used for this commit is as follows:
* If a class already has the attribute: no action needed.
* If a class does not `extend`: add the attribute.
* If a class does `extend`:
 - If it extends `stdClass`: no action needed (as `stdClass` supports dynamic properties).
 - If it extends a PHP native class: add the attribute.
 - If it extends a class from one of WP's external dependencies: add the attribute.
* In all other cases: no action — the attribute should not be needed as child classes inherit from the parent.

Whether or not a class contains magic methods has not been taken into account, as a review of the currently existing magic methods has shown that those are generally not sturdy enough and often even set dynamic properties (which they should not). See the [https://www.youtube.com/watch?v=vDZWepDQQVE live stream from August 16, 2022] for more details.

This commit only affects classes in the `src` directory of WordPress core.
* Tests should not get this attribute, but should be fixed to not use dynamic properties instead. Patches for this are already being committed under ticket #56033.
* While a number bundled themes (2014, 2019, 2020, 2021) contain classes, they are not a part of this commit and may be updated separately.

Reference: [https://wiki.php.net/rfc/deprecate_dynamic_properties PHP RFC: Deprecate dynamic properties].

Follow-up to [53922].

Props jrf, hellofromTonya, markjaquith, peterwilsoncc, costdev, knutsp, aristath.
See #56513, #56034.
Built from https://develop.svn.wordpress.org/trunk@54133


git-svn-id: http://core.svn.wordpress.org/trunk@53692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-12 15:47:14 +00:00
noisysocks
40cd53a573 Editor: Fix how the Site Editor is linked to
- Add 'Edit site' to the top admin bar.
- Link to the Template and Template Part CPTs.
- Add deep link to the Global Styles UI.

Follows [52069].
See #54337.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-15 03:43:59 +00:00
Sergey Biryukov
fee2d3ed94 Docs: Improve documentation for WP_Admin_Bar methods.
Add some missing descriptions and `@since` tags.

Follow-up to [15671], [19120], [19429], [19501], [19558], [25475], [25478], [25563], [32534], [35157], [40947], [45821], [48826].

Props yagniksangani, hellofromTonya, audrasjb, sabernhardt, mukesh27, rehanali, SergeyBiryukov.
Fixes #54191.
Built from https://develop.svn.wordpress.org/trunk@51876


git-svn-id: http://core.svn.wordpress.org/trunk@51469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-29 13:39:59 +00:00
Sergey Biryukov
d7c0343d5f Docs: Improve description for WP_Admin_Bar::add_group().
Props stevenlinx.
Fixes #50779.
Built from https://develop.svn.wordpress.org/trunk@48826


git-svn-id: http://core.svn.wordpress.org/trunk@48588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-19 02:46:04 +00:00
Sergey Biryukov
7d0d6672c4 Accessibility: Toolbar: Don't output the "Skip to toolbar" link in modern themes that support the wp_body_open action.
The links is unnecessary there, as the toolbar is the first thing in the DOM within the `<body>` element.

For themes that don't implement the `wp_body_open` action yet and render the admin bar in the footer, the "Skip to toolbar" link with `tabindex="1"` is still necessary, to ensure it's the first focusable element in the page.

Props sarahricker, afercia, erikjandelange, audrasjb.
Fixes #50702.
Built from https://develop.svn.wordpress.org/trunk@48812


git-svn-id: http://core.svn.wordpress.org/trunk@48574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-17 14:26:07 +00:00
Dominik Schilling
7ded6c2d2a Administration: Remove any CSS related to Internet Explorer versions 6 – 10.
In WordPress 3.2 support for IE6 was dropped, IE7 followed a few versions later. With the 4.8 release, WordPress officially ended support for Internet Explorer versions 8, 9, and 10. Yet, we still have shipped CSS for the unsupported IE versions....until now! Goodbye to ie.css and star hacks!

* Removes ie.css and `ie` style handle.
* Removes IE specific class names and any related CSS.
* Drops support for IE8 and older in `wp_customize_support_script()`.
* Updates compatibility mode for CSS minification to `ie11`.

Props ayeshrajans, isabel_brison, afercia, netweb, peterwilsoncc, ocean90.
Fixes #17232, #46015.
Built from https://develop.svn.wordpress.org/trunk@47771


git-svn-id: http://core.svn.wordpress.org/trunk@47547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-06 20:15:07 +00:00
Sergey Biryukov
641c632b0c Coding Standards: Use Yoda conditions where appropriate.
See #49222.
Built from https://develop.svn.wordpress.org/trunk@47219


git-svn-id: http://core.svn.wordpress.org/trunk@47019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-09 16:55:09 +00:00
Sergey Biryukov
001ffe81fb Docs: Improve inline comments per the documentation standards.
Includes minor code layout fixes for better readability.

See #48303.
Built from https://develop.svn.wordpress.org/trunk@47122


git-svn-id: http://core.svn.wordpress.org/trunk@46922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-29 00:45:18 +00:00
Andrea Fercia
6b4368669d Toolbar: Remove leftover @since notations after [46678].
See #19647.

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


git-svn-id: http://core.svn.wordpress.org/trunk@46908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-23 12:59:06 +00:00
whyisjake
ba7170de9c Toolbar: Properly escape the onclick attribute.
The onclick attribute was being escaped twice, once with `esc_js` and again with `esc_attr`.

Fixes #48117.
Props tmatsuur, dinhtungdu.


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


git-svn-id: http://core.svn.wordpress.org/trunk@46534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-11-15 23:24:02 +00:00
John Blackbourn
84a1922e18 Toolbar: Un-deprecate the WP_Admin_Bar::add_menu() method.
This is only a wrapper for the `add_node()` method, but it's in widespread use both in core until [46642] and in thousands of plugins and themes. Deprecating it would have made sense when #19647 was originally opened but that's no longer the case.

Props whyisjake

Fixes #19647 

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


git-svn-id: http://core.svn.wordpress.org/trunk@46478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-11-08 13:19:04 +00:00
whyisjake
5e7876622e Toolbar: Use add_node() instead of add_menu() in core.
This patch replaces all references to the add_menu() method with the add_node() one. (Also some code structure modifications for wp_admin_bar_appearance_menu().)

Fixes: #19647
Props: linuxologos, paulschreiber, morganestes, akibjorklund, nacin, whyisjake.

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


git-svn-id: http://core.svn.wordpress.org/trunk@46442 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-11-03 22:14:01 +00:00
Sergey Biryukov
92ba2cc95d Code Modernisation: Remove redundant calls to func_get_arg() in wp-includes/class-wp-admin-bar.php.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46140


git-svn-id: http://core.svn.wordpress.org/trunk@45952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:46:54 +00:00
John Blackbourn
3796b7da13 Docs: Add a missing return type.
See #47110

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


git-svn-id: http://core.svn.wordpress.org/trunk@45632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-16 19:35:58 +00:00
Gary Pendergast
4803fc405e Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-includes.
See #47632.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-02 23:42:58 +00:00
Felix Arntz
3a77265148 Bootstrap/Load: Introduce a recovery mode for fixing fatal errors.
Using the new fatal handler introduced in [44962], an email is sent to the admin when a fatal error occurs. This email includes a secret link to enter recovery mode. When clicked, the link will be validated and on success a cookie will be placed on the client, enabling recovery mode for that user. This functionality is executed early before plugins and themes are loaded, in order to be unaffected by potential fatal errors these might be causing.

When in recovery mode, broken plugins and themes will be paused for that client, so that they are able to access the admin backend despite of these errors. They are notified about the broken extensions and the errors caused, and can then decide whether they would like to temporarily deactivate the extension or fix the problem and resume the extension.

A link in the admin bar allows the client to exit recovery mode.

Props timothyblynjacobs, afragen, flixos90, nerrad, miss_jwo, schlessera, spacedmonkey, swissspidy.
Fixes #46130, #44458.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 21:53:51 +00:00
Andrea Fercia
9e8d0c14d3 Accessibility: Hide the Toolbar sub-menu CSS generated icons from assistive technologies.
CSS generated content is rendered for speech output. When it's not meant to be announced by assistive technologies, for example with font icons, special care should be used to hide it. At the moment, the only reliable way to do this is making use of a wrapper element and set `aria-hidden="true"` on it.

Fixes #37513.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-04 22:46:52 +00:00
Andrea Fercia
3578f89900 Accessibility: Improve the way Internet Explorer 11 and JAWS announce fieldset legends.
When Internet Explorer encounters a non interactive element with a `tabindex`
attribute, it adds the element to the accessibility tree with a `role=group` and
an accessible name computed from the element. This prevents JAWS from announcing
any fieldset legend within the element.

- removes `tabindex="0"` from the content and the toolbar containers: these tabindex attributes are no longer needed
- removes `aria-label="Main content"` from the content container: not needed
- keeps the media modal focus fallback introduced in [38142] by making the `#wpbody-content` element focusable only when needed

Props stevefaulkner, aardrian.
Fixes #43154.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 11:55:51 +00:00
Gary Pendergast
aaf99e6913 Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-30 23:11:00 +00:00
Gary Pendergast
39a3fe9180 Admin Bar: Fix another HTML error introduced in [42128].
Props Otto42.
See #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-08 23:13:46 +00:00
Gary Pendergast
e822e4578a Admin Bar: Fix a HTML error introduced in [42128].
Props swissspidy.
See #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-08 08:52:48 +00:00
Gary Pendergast
bde3b95936 Admin Bar: Reformat the render methods.
The admin bar render methods use some cute tricks which don't come close to the WordPress coding standards. So that we can more easily apply automated code fixing to the codebase, these tricks need to be removed.

See #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-08 08:35:51 +00:00
Drew Jaynes
0860bb2771 Docs: Remove @access notations from method DocBlocks in wp-includes/* classes.
Prior to about 2013, many class methods lacked even access modifiers which made the `@access` notations that much more useful. Now that we've gotten to a point where the codebase is more mature from a maintenance perspective and we can finally remove these notations. Notable exceptions to this change include standalone functions notated as private as well as some classes still considered to represent "private" APIs.

See #41452.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 00:41:44 +00:00
Drew Jaynes
97ef1ca74b Docs: Add missing deprecation, introduction, and summary information to the DocBlock for WP_Admin_Bar::recursive_render().
Props coffee2code.
Fixes #40840.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 21:58:41 +00:00
Andrea Fercia
7b3445c312 Accessibility: Revert [38984] as it needs to be better communicated to plugin authors.
See #37513.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-05 16:28:33 +00:00
Andrea Fercia
7b0abd1cea Accessibility: Hide the Toolbar sub-menu icons from assistive technologies.
CSS generated content is going to be rendered for speech output more and more in
the next future. When it's not intended to be available for speech output, for
example with font icons, then special care should be used to hide it from
assistive technologies. At the moment, the only reliable way to do this is making 
use of a wrapper element and set `aria-hidden="true"` on it.

Fixes #37513.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 20:53:30 +00:00
Scott Taylor
0eebbed6b2 General: revert [38467], wp_is_IE() should not exist.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38409 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 15:22:31 +00:00
Scott Taylor
021e23e70b General: use a new function, wp_is_IE(), instead of the $is_IE global in a number of places.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 06:42:33 +00:00
Dominik Schilling
f160f2afd1 Toolbar: Allow 0 as a value for the tabindex property of a menu item.
To enhance accessibility for items without a link you can now define `tabindex="0"`, which makes descendant dropdowns accessible.

Props joedolson, afercia, ocean90.
Fixes #32495.
Built from https://develop.svn.wordpress.org/trunk@38035


git-svn-id: http://core.svn.wordpress.org/trunk@37976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-12 11:18:30 +00:00
Sergey Biryukov
139387b7e5 Docs: Use 3-digit, x.x.x-style semantic versioning for _doing_it_wrong(), _deprecated_function(), _deprecated_argument(), and _deprecated_file() throughout core.
Props metodiew.
Fixes #36495.
Built from https://develop.svn.wordpress.org/trunk@37985


git-svn-id: http://core.svn.wordpress.org/trunk@37926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-06 12:40:29 +00:00
Drew Jaynes
2802e067a1 Docs: Improve the DocBlock summary and add a missing initial @since version for WP_Admin_Bar::add_node().
See #32246. See #35986.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-03 15:58:27 +00:00
Pascal Birchler
59351cb62d Toolbar: Allow adding lang and dir attributes to toolbar items.
This is useful from a multilingual and accessibility perspective.

Props Chouby, leemon.
Fixes #33513.
Built from https://develop.svn.wordpress.org/trunk@35795


git-svn-id: http://core.svn.wordpress.org/trunk@35759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-06 21:37:25 +00:00
Drew Jaynes
d01f1c2e15 Docs: Add missing file headers to two Toolbar API files: wp-includes/admin-bar.php and wp-includes/class-wp-admin-bar.php.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35123 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-14 17:27:25 +00:00
Helen Hou-Sandí
28c1600e6e Toolbar: Disambiguate links to the dashboard vs. to the customizer.
All links in the site name menu now point to admin screens, and Customize is its own top-level link. This makes it clear which context you are about to enter.

fixes #32924. see #32678.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-08 20:03:24 +00:00
Scott Taylor
c502a281bb After [32656], add @access annotations to methods that have no doc block in wp-includes/*.
Makes it easier to search for no doc blocks via `}[\n\t\r ]+(protected|private|public)`.

See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-29 21:37:24 +00:00
Scott Taylor
bd8fafea54 Use void instead of null where appropriate when pipe-delimiting @return types. If a @return only contains void, remove it.
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-24 05:40:25 +00:00
Scott Taylor
f7098c8c2e In class-wp-admin-bar.php, clarify/add some doc blocks.
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-21 21:39:24 +00:00
Dominik Schilling
a7ba89b027 Accessibility: Add landmark roles to WordPress admin areas.
props afercia, joedolson.
fixes #31450.
Built from https://develop.svn.wordpress.org/trunk@31955


git-svn-id: http://core.svn.wordpress.org/trunk@31934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-01 13:17:27 +00:00
Scott Taylor
0a4af6d45c In wp-includes/class-wp-admin-bar.php, break is unreachabled after return.
See #27882.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-06 18:29:15 +00:00
Drew Jaynes
d2014cfce3 Convert argument array documentation to the hash-notation style for WP_Admin_Bar::add_node() and WP_Admin_Bar::add_group().
Fixes #27258.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27220 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-03 06:11:13 +00:00
Andrew Nacin
83a0b00489 Accept rel attributes in the toolbar's add_node() method.
props stephcook22.
fixes #27234.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27217 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-03 02:14:13 +00:00
Matt Thomas
2adf09fea9 Bring in the responsive component of MP6. See #25858.
* Makes the admin fully responsive down to 320px wide.
* Adds a touch-optimized main menu that can be opened and closed from the toolbar.
* Size and positioning adjustments to icons, buttons, and text elements for better touch usability.

A few changes since MP6:

* Removed jQuery mobile. This script was used to add swipe controls to open/close the sidebar menu. This feature was apparently buggy and due to the pending demise of jQuery mobile, it was removed.
* Removed use of Backbone.js. Adding Backbone.js to this script would add a dependency of Backbone.js for all of the admin. Additionally, it was used to add a menu item. Instead of doing that, it was added via the admin menu API. This also fixes a bad delay in the item showing in the menu.
* CSS layout is standardized. Comments have also been cleaned up.
* Jetpack and Akismet code is removed.
* RTL CSS is removed.
* JS passes hinting other than one small issue that will likely be removed when parts of the code are reviewed.

A number of areas for improvement remain; we're tracking these issues in the comments of #25858.

Props to tollmanz, tillkruess, helen, dd32, and apeatling.


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


git-svn-id: http://core.svn.wordpress.org/trunk@26046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-13 18:00:10 +00:00
Andrew Nacin
70fd806759 Revert r25824:25875 from the core.svn.wordpress.org repository.
These commits were accidentally re-synced commits from develop.svn.wordpress.org due to a race condition. Thankfully, the history of this repository matters fairly little. It also happened only for trunk.


git-svn-id: http://core.svn.wordpress.org/trunk@25876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-25 02:29:52 +00:00
Andrew Nacin
8ae8e01b67 Remove the old wp_auto_updates_maybe_update cron event. Schedule the new wp_maybe_auto_update event at 7 a.m. and 7 p.m. in the site's timezone.
see #27704.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:53:14 +00:00
Ryan Boren
b87d4b77e5 Pinking shears
Built from https://develop.svn.wordpress.org/trunk@25880


git-svn-id: http://core.svn.wordpress.org/trunk@25792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-23 14:38:10 +00:00
Drew Jaynes
fda48c2462 Improve inline comment for removing default padding styles for the Toolbar.
Props nofearinc.
Fixes #25373.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-22 14:34:11 +00:00
Sergey Biryukov
794414c412 Correct @since for hooks in wp-includes/class-wp-admin-bar.php. see #25229.
Built from https://develop.svn.wordpress.org/trunk@25478


git-svn-id: http://core.svn.wordpress.org/trunk@25399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-18 11:58:19 +00:00
Peter Westwood
b3689b7a35 Inline documentation for hooks in wp-includes/class-wp-admin-bar.php
See #25229 props betzster

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


git-svn-id: http://core.svn.wordpress.org/trunk@25396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-18 07:42:09 +00:00