Commit Graph

201 Commits

Author SHA1 Message Date
Eric Lewis
0c1cca9961 Menus: Ensure theme location setting data is saved with a large menu.
[36510] introduced a fix to allow users to save large menus on the Edit Menu screen (70+ menu items). The form data is stored as JSON which is used to inject the `$_POST` variable in the form submission handler. This injection was not setting form items with named array elements properly (e.g. `menu-locations[primary]`), which did not save theme location data in a large form.

Props keraweb.
See #14134.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-05 00:47:26 +00:00
Eric Lewis
360a30d55e Menus: Ensure backslashes are saved in menu item fields.
This was a regression introduced in [36510] which caused menu item fields to not save field content with backslashes in them.

Props westonruter.
See #14134.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-22 19:55:28 +00:00
Eric Lewis
2bfc0f5218 Menus: Allow larger menus to be created in the Edit Menu screen.
In the Edit Menu screen, each menu item creates 11 form input elements. In menus with more than 71 menu items, often items after the 71st weren't saved. This was because PHP's runtime configuration `max_input_vars` default value is 1000. Large menus exceed this, so PHP didn't populate the `$_POST` superglobal for the latter menu items.

The entire form is now JSON-encoded into a single input which populates `$_POST` manually on form submission.

This was attempted previously in [36506] which was reverted in [36507]. Some form fields were not being slurped into the form's JSON representation, and it did not scale for a site with many posts. This approach fixes those problems.

Props ocean90, afercia.
See #14134.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-11 19:08:27 +00:00
Eric Lewis
a64dbc805b Menus: Revert larger menu support in Edit Menus screen in [36506].
JSON encoding the form as it exists on the page will not scale. 

See #14134.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-10 14:11:26 +00:00
Eric Lewis
48fdbf96de Menus: Allow larger menus to be created in the Edit Menu screen.
In the Edit Menu screen, each menu item creates 11 form input elements. In menus with more than 71 menu items, often items after the 71st weren't saved. This was because PHP's runtime configuration `max_input_vars` default value is 1000. Large menus exceed this, so PHP didn't populate the `$_POST` superglobal for the latter menu items.

The entire form is now JSON-encoded into a single input which populates `$_POST` manually on form submission.

See #14134.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-10 03:32:25 +00:00
Andrea Fercia
62d8fda8dd After [36171] remove all the occurrences of the old CSS clearfix.
The old clearfix was applied to very specific items and defined multiple times
across CSS files. Uses the new generic `.wp-clearfix` utility class instead.

See #26396.
Built from https://develop.svn.wordpress.org/trunk@36422


git-svn-id: http://core.svn.wordpress.org/trunk@36389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-30 13:46:27 +00:00
Dion Hulse
34b9af6efd Menus: Remove a redundant and unused 0 parameter from the Delete Menu link on the nav menus admin screen.
Fixes #35641.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-28 06:14:25 +00:00
Andrea Fercia
450cbb3e81 Accessibility: Remove title attributes from the Menus screen.
Also, adds missing labels and improves the existing ones. 
Updates the "custom links" labels and inputs in the Customizer too.
Introduces a generic, reusable, `.wp-initial-focus` CSS class to be used for
the sole purpose of setting the initial focus.
"Quick Search": uniform the attached events and avoids new AJAX requests to
be triggered when the pressed key doesn't change the searched term.

Fixes #35374.
Built from https://develop.svn.wordpress.org/trunk@36379


git-svn-id: http://core.svn.wordpress.org/trunk@36346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-22 14:26:27 +00:00
Andrea Fercia
52920b8511 Introduce a new generic CSS clearfix utility class.
`.wp-clearfix` is now the recommended way to clear and contain floated elements.
Adds back compatibility for the `.nav-tab-wrapper` navigation tabs.

See #26396.
Built from https://develop.svn.wordpress.org/trunk@36171


git-svn-id: http://core.svn.wordpress.org/trunk@36138 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-05 13:38:30 +00:00
Sergey Biryukov
17af54fc7c Customizer: Use correct context and translator comments for menu location strings.
See #33431.
Built from https://develop.svn.wordpress.org/trunk@35722


git-svn-id: http://core.svn.wordpress.org/trunk@35686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-20 17:46:25 +00:00
Sergey Biryukov
5ceecc4eaf Provide more helpful feedback than just "Cheatin' uh?" for permission errors in wp-admin/nav-menus.php.
props ericlewis, kraftbj, lukecarbis, mrmist.
fixes #33673. see #14530.
Built from https://develop.svn.wordpress.org/trunk@33862


git-svn-id: http://core.svn.wordpress.org/trunk@33830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-02 18:21:21 +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
Boone Gorges
2c9e81349c When splitting a shared 'nav_menu' term, ensure that nav items and theme locations are retained.
Props boonebgorges, dd32.
Fixes #33187.
Built from https://develop.svn.wordpress.org/trunk@33611


git-svn-id: http://core.svn.wordpress.org/trunk@33578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-12 14:07:26 +00:00
Jeremy Felt
a0e830d9af Nav Menus: Add a Menus title with Manage in Customizer button to nav-menus.php
This aligns the `<h1>` on `wp-admin/nav-menus.php` with that of other admin screens and aligns the "Manage in Customizer" button with that on `wp-admin/widgets.php`.

Fixes #32808.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33327 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-22 01:26:25 +00:00
Dominik Schilling
cfa6e60bcb Nav menus: Add an ID attribute to the menu select box to link it with the label.
see #31816.
fixes #32699.
Built from https://develop.svn.wordpress.org/trunk@33174


git-svn-id: http://core.svn.wordpress.org/trunk@33146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-12 12:08:24 +00:00
Konstantin Obenland
0a64d94562 Nav menus: Restore menu id in hidden input.
`wp-admin/js/nav-menu.js` uses the value as context for quick searches and when
adding menu items.

Reverts [32695], see #31816.
Fixes #32699.


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


git-svn-id: http://core.svn.wordpress.org/trunk@33133 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-11 06:11:24 +00:00
Konstantin Obenland
52c2567424 Menus: Respect context when linking to the Customizer.
`Manage in Customizer` will now link to menu locations or the menus panel in
the customizer, depending on whether the user is editing menus or managing
locations.

Props rabmalin for initial patch.
Fixes #32852.


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


git-svn-id: http://core.svn.wordpress.org/trunk@33083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-07 17:49:24 +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
aa3cb4ab1d Use correct panel id for menus when linking to the customizer.
Props swissspidy.
Fixes #32808.


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


git-svn-id: http://core.svn.wordpress.org/trunk@32975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-30 16:24:24 +00:00
Sergey Biryukov
bff91cfa5b Menus: Add a Manage in Customizer link, like we did for Widgets screen in [30459].
props celloexpressions.
fixes #32808.
Built from https://develop.svn.wordpress.org/trunk@32985


git-svn-id: http://core.svn.wordpress.org/trunk@32956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-28 06:08: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
Helen Hou-Sandí
93b5a9a7fa Nav menus: Hidden inputs do not need an ID, especially one that's already in use.
props sagarjadhav.
fixes #31816.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-05 15:36:27 +00:00
Scott Taylor
b56b9b3e5c Add @global annotations for wp-admin/*.
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-28 21:41:30 +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
6a297b848a After [31941], use the decoupled strings from WP_Customize_Manager::register_controls() on the Menus screen.
see #28502.
Built from https://develop.svn.wordpress.org/trunk@31951


git-svn-id: http://core.svn.wordpress.org/trunk@31930 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-01 11:37:26 +00:00
Sergey Biryukov
a1dbd97adb Fix duplicate ID for Save Menu button on Menus screen.
props sagarjadhav.
fixes #31803.
Built from https://develop.svn.wordpress.org/trunk@31927


git-svn-id: http://core.svn.wordpress.org/trunk@31906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-30 09:49:26 +00:00
Helen Hou-Sandí
296dba2804 Nav menus: Return to calling links "Custom Links".
It was like this before 3.6 and got a bit lost during that development cycle. Also uses the terminology more consistently in the nav menu UI.

props tyxla.
fixes #31344.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-12 06:15:27 +00:00
Andrew Ozz
19dbf7b998 Improve table footer tab sequence by moving <tfoot> after <tbody>. Props afercia, rianrietveld, DrewAPicture. Fixes #30914.
Built from https://develop.svn.wordpress.org/trunk@31513


git-svn-id: http://core.svn.wordpress.org/trunk@31494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-22 21:48:26 +00:00
Aaron Jorbin
a4a1273d3a Improve accessibility of nav menu locations form.
A couple of small tweaks to the nav menu locations form that make it friendlier to assistive technology.  These include:
 * labels for selects
 * better context for the "Edit" link.  We hide "edit" from screen readers and instead give them a phrase with context since they may not be able to take advantage of the visual context

Additionally, there are some minor css tweaks to improve the visual alignment of the rows.
We also remove duplicate IDs and use classes instead.

Props afercia.
fixes #31090.


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


git-svn-id: http://core.svn.wordpress.org/trunk@31253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-23 18:18:26 +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
John Blackbourn
d88ed475b0 Switch to a 403 response code in places where it is more appropriate than a 500 due to permissions errors.
Fixes #10551
Props nacin

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


git-svn-id: http://core.svn.wordpress.org/trunk@30355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-16 06:16:22 +00:00
Sergey Biryukov
16a55620c3 Twenty Fifteen: Update some more bundled theme references after [29895].
see #29799.
Built from https://develop.svn.wordpress.org/trunk@29900


git-svn-id: http://core.svn.wordpress.org/trunk@29655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-15 14:35:18 +00:00
Sergey Biryukov
504d4ad5eb Change the default orderby value in wp_get_nav_menus() to 'name'.
props voldemortensen, igmoweb.
fixes #29460.
Built from https://develop.svn.wordpress.org/trunk@29792


git-svn-id: http://core.svn.wordpress.org/trunk@29564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-29 15:45:16 +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
Mark Jaquith
a43313fe12 Use '&mdash; Select &mdash;' instead of '-- Select --' for nav menus. Looks nicer.
see #27878
Built from https://develop.svn.wordpress.org/trunk@28205


git-svn-id: http://core.svn.wordpress.org/trunk@28035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-25 00:35:25 +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
Sergey Biryukov
3533e3575f Use esc_attr_e() instead of _e() for attribute values.
props DJPaul.
fixes #27274.
Built from https://develop.svn.wordpress.org/trunk@27400


git-svn-id: http://core.svn.wordpress.org/trunk@27247 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-04 21:10:15 +00:00
Andrew Ozz
87589dd445 Remove table cellspacing attribute from the admin, part-props MattyRob, fixes #22086.
Built from https://develop.svn.wordpress.org/trunk@27036


git-svn-id: http://core.svn.wordpress.org/trunk@26912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-26 20:28:12 +00:00
Sergey Biryukov
cac815c4e9 Avoid a PHP notice on Edit Menus screen when a menu is attached to a non-existing location.
props nofearinc.
fixes #26287.
Built from https://develop.svn.wordpress.org/trunk@26634


git-svn-id: http://core.svn.wordpress.org/trunk@26524 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-04 20:37:11 +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
Sergey Biryukov
72d4b140fb Make Twenty Fourteen the default theme. props markmcwilliams. fixes #25702.
Built from https://develop.svn.wordpress.org/trunk@26024


git-svn-id: http://core.svn.wordpress.org/trunk@25955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-06 20:02:09 +00:00
Drew Jaynes
f34eb77cbc Inline documentation for hooks in wp-admin/nav-menus.php.
Props pauldewouters for the intial patch.
Fixes #25528.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-30 15:45:08 +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
145809b457 Consolidate similar menu locations strings. props DrewAPicture. fixes #24945.
Built from https://develop.svn.wordpress.org/trunk@25218


git-svn-id: http://core.svn.wordpress.org/trunk@25189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-03 01:42:10 +00:00
Andrew Nacin
8e56222a1a Nav menus: Allow assigning a new menu to an existing location when no theme setting is currently saved.
props ocean90.
see #25064, for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25167 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-31 01:37:08 +00:00
Andrew Nacin
cf9dad79f1 Adjust menus help text to reflect how a menu item is actually edited. props nullvariable, fixes #24935.
git-svn-id: http://core.svn.wordpress.org/trunk@24981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-05 22:02:34 +00:00
Andrew Nacin
a226d1ea5e Change nav menus help text to reflect the proper name of the "Custom Menu" widget. props SergeyBiryukov, fixes #24860.
git-svn-id: http://core.svn.wordpress.org/trunk@24980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-05 22:01:53 +00:00
Andrew Nacin
1ecc494434 Change nav menus help text to reflect the proper name of the "Custom Menu" widget. props DrewAPicture, fixes #24860.
git-svn-id: http://core.svn.wordpress.org/trunk@24979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-05 22:01:04 +00:00
Helen Hou-Sandí
0da48b8335 Tweaks to the accordion:
* Enqueues JS in `do_accordion_sections()`.
* Top and bottom rounded corners for the nav menu accordion.
* Better RTL and no-JS.

props lessbloat, DrewAPicture, aaroncampbell, helen. fixes #23449.


git-svn-id: http://core.svn.wordpress.org/trunk@24680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-12 18:16:29 +00:00