Commit Graph

27 Commits

Author SHA1 Message Date
audrasjb 9564a68697 Twenty Fifteen: Use `#page` height instead of `body` height in sidebar scroll calculation.
This changeset replaces `bodyHeight = $body.height();` with `bodyHeight = $('#page).height();`. It fixes a JS issue in some specific context, when there is content generated right before the closing `body` tag. For example, this happens when the HTML content is added using the `wp_footer` filter.

Props stephenharris, sabernhardt, audrasjb.
Fixes #40492.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-24 21:03:10 +00:00
hellofromTonya 5c414db9ad External Libraries: Further fix jQuery deprecations in WordPress core.
Follow-up to [50001], [50270], [50367], [50383], [50410], [50420], [50429], [50547].

Props chaion07, Clorith, costdev, desrosj, malthert, peterwilsoncc, presskopp, promz, sabernhardt, SergeyBiryukov, toro_unit, wpnomad.
Fixes #51519.
Built from https://develop.svn.wordpress.org/trunk@52285


git-svn-id: http://core.svn.wordpress.org/trunk@51877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-30 17:18:01 +00:00
Sergey Biryukov 9f12d7f575 External Libraries: First pass at fixing jQuery deprecations in WordPress core and bundled themes.
To be able to disable jQuery Migrate as step 3 of updating the jQuery version shipped with WordPress, all `JQMIGRATE` warnings in the browser console will have to be addressed.

This includes many minor adjustments to a wide array of core files.

Follow-up to:
* Step 1: Disabling jQuery Migrate 1.4.1 in WordPress 5.5: [48323], [48324]
* Step 2: Updating jQuery to 3.5.1 and adding jQuery Migrate 3.3.x in WordPress 5.6: [49101], [49338], [49615], [49649]

Props Clorith, azaozz.
See #51812.
Built from https://develop.svn.wordpress.org/trunk@50001


git-svn-id: http://core.svn.wordpress.org/trunk@49702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-22 12:32:03 +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
whyisjake 2822281c57 Themes: Fix javascript regression that linter found.
Tests were failing from line length optimizations and double quotes. 

Fixes #37536

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


git-svn-id: http://core.svn.wordpress.org/trunk@46109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-25 22:12:57 +00:00
whyisjake 0acc444279 Themes: Improve Twenty Fifteen sticky sidebar logic
The current logic in TwentyFifteen (#30366) for making the sidebar sticky while still allowing to scroll through it when the sidebar height is larger than the viewport height is flawed and massively overcomplicated.
This can be mitigated by removing the admin bar specific logic and leaving most of the heavy lifting up to the browser.

Fixes #37536

Props DvanKooten, lukecavanagh, karmatosed, ianbelanger, davidbaumwald


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


git-svn-id: http://core.svn.wordpress.org/trunk@46107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-25 21:38:58 +00:00
atimmer f6a37e7d39 Docs: Remove `@summary` tags from JSDoc.
As decided in the JavaScript core chat. With a few reasons:

* It is visually cleaner when reading the source.
* This bring the JavaScript documentation closer to the PHP documentation.

The only disadvantage is that the JSDoc parser doesn't split out the summary and the description in the new format. We've decided to solve this when building the JavaScript documentation parser.

Props herregroen.
Fixes #42901.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-18 14:14:53 +00:00
Tammie Lister 12c6679165 Twenty Thirteen, Twenty Fourteen and Twenty Fifteen: Fixes insufficient check for existence of DOM elements in jQuery object
Fixes #34033
Props: tywayne 

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


git-svn-id: http://core.svn.wordpress.org/trunk@36966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-15 21:33:28 +00:00
Weston Ruter 49b3ad2251 Twenty Fifteen: Only re-initialize the main navigation in the Customizer when it is specifically updated.
* Fix a bug where updating the social menu links would cause the main navigation to get its toggle-expanded buttons duplicated.
* Persist any existing submenu expanded states on the updated menu. 
* Improve naming of `customize-preview-menu-refreshed` event param from `wpNavArgs` to `wpNavMenuArgs` (old name is retained and marked as deprecated).

Fixes #33177.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33458 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 18:13:24 +00:00
Dominik Schilling b2b3f1c3ff Twenty Fifteen: Wrap navigation helpers into a function so it can be called on a refresh event of the Customize Preview.
props westonruter.
see #32576.
Built from https://develop.svn.wordpress.org/trunk@32807


git-svn-id: http://core.svn.wordpress.org/trunk@32778 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-16 22:18:24 +00:00
Lance Willett 57918dfc8f Twenty Fifteen: adjust scroll behavior to make sure sidebar height is calculated during scroll events, not just resize events.
Fixes #31734. Props jartes, lancewillett.
Built from https://develop.svn.wordpress.org/trunk@31934


git-svn-id: http://core.svn.wordpress.org/trunk@31913 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-30 22:49:27 +00:00
Lance Willett 80faa524fe Bundled themes: add documentation for new `onResizeARIA` function.
See #31527. Props davidakennedy, lancewillett.
Built from https://develop.svn.wordpress.org/trunk@31814


git-svn-id: http://core.svn.wordpress.org/trunk@31796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-18 18:31:26 +00:00
Lance Willett 04ff214073 Twenty Fifteen: add ARIA attributes to menu toggle.
See #31527, props davidakennedy, lance.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-06 17:34:26 +00:00
Lance Willett f6fd49b357 Twenty Fifteen: keep sub-menus open when visiting sub-menu pages, to show context when navigating a site.
Props jartes, fixes #30722.
Built from https://develop.svn.wordpress.org/trunk@31214


git-svn-id: http://core.svn.wordpress.org/trunk@31195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 19:17:22 +00:00
Lance Willett 4d00172987 Twenty Fifteen: remove unused CSS rules for `wp_page_menu` since are not used in the theme. And a bit of CSS cleanup.
Props iamtakashi, fixes #30957.
Built from https://develop.svn.wordpress.org/trunk@31183


git-svn-id: http://core.svn.wordpress.org/trunk@31164 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-15 23:05:22 +00:00
Lance Willett deb5337d7c Twenty Fifteen: update scroll functionality to make sure child menu items are always reachable.
Props iamtakashi, fixes #30674.
Built from https://develop.svn.wordpress.org/trunk@30838


git-svn-id: http://core.svn.wordpress.org/trunk@30828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-12 23:59:22 +00:00
Ian Stewart d3adc02051 Twenty Fifteen: correcting odd scrolling and jumping in IE and no-scroll with window resize.
Props iamtakashi, ocean90, fixes #30632, #30645.



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


git-svn-id: http://core.svn.wordpress.org/trunk@30798 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-10 23:02:23 +00:00
Ian Stewart 867aabca4a Twenty Fifteen: less than or equal to is incorrect here when the sidebar only appears at 955px -- it should be less than for removal of inline styles.
Props iamtakashi, fixes #30656


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


git-svn-id: http://core.svn.wordpress.org/trunk@30794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-10 13:31:22 +00:00
Andrew Ozz 0517ee7c6e TwentyFifteen:
- Fix image caption alignment in the editor.
- Remove unused var from functions.js.
Also includes few images that were shrunk a bit when running grunt precommit.
Fixes #30493.
Built from https://develop.svn.wordpress.org/trunk@30562


git-svn-id: http://core.svn.wordpress.org/trunk@30551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-25 06:12:22 +00:00
Ian Stewart 5c6de0c973 Twenty Fifteen: Making the sidebar sticky for everyone. When we have a long sidebar, let it scroll with the content, but fixing the sidebar and no longer scrolling when we get to the end of the sidebar content. Scroll up and the sidebar starts scrolling up to, eventually staying fixed when it gets back to the top.
Props celloexpressions, avryl, fixes #30366.



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


git-svn-id: http://core.svn.wordpress.org/trunk@30385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-19 18:23:21 +00:00
Ian Stewart 3f967c8f1a Twenty Fifteen: unfix the sidebar if we have a menu with submenus as there is a chance visitors might not be able to scroll down to see submenus in some situations.
Props mattwiebe, fixes #30208.


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


git-svn-id: http://core.svn.wordpress.org/trunk@30323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-13 03:09:22 +00:00
Ian Stewart d21ea0a251 Twenty Fifteen: Formatting cleanup for documentation, crossing eyes, dotting tees.
Props lancewillett, MikeHansenMe, fixes #30149.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30233 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-04 20:26:23 +00:00
Ian Stewart c1b360a665 Twenty Fifteen: prevent a flash of visible sub menus before scripts load.
Props mattwiebe, aferica, fixes #30056.


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


git-svn-id: http://core.svn.wordpress.org/trunk@30211 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-03 18:58:23 +00:00
Ian Stewart a8f8a655f2 Twenty Fifteen: If the sidebar is taller than the viewport scroll it with the content, if it's shorter keep it fixed.
Props mattwiebe, iamtakashi, avryl, fixes #29979.


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


git-svn-id: http://core.svn.wordpress.org/trunk@30025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-26 15:04:21 +00:00
Ian Stewart 3ec1c95062 Twenty Fifteen: valid HTML for accessible child page menu expanding and collapsing -- now with even better accessiblity.
Props afercia, davidakennedy, iamtakashi, fixes #30083.


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


git-svn-id: http://core.svn.wordpress.org/trunk@30013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-24 15:15:20 +00:00
Andrew Nacin e2041b8fbb Twenty Fifteen: JSHint fixes.
* Define global variables set by wp_localize_script().
 * Remove currently unused $ variable.
 * Use dot notation when appropriate.
 * Update Gruntfile.js to ignore the html5 shiv.
see #29799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 19:48:19 +00:00
Ian Stewart affa411402 Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.

Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799


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


git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 19:28:18 +00:00