#38502 closed defect (bug) (fixed)
Twenty Seventeen: Unnecessary l10n variables
Reported by: | enodekciw | Owned by: | davidakennedy |
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | 4.7 |
Component: | Bundled Theme | Keywords: | has-patch |
Focuses: | Cc: |
Description (last modified by )
Hey,
Since [38909], both
if ( 'true' === twentyseventeenScreenReaderText.has_navigation )
conditionals in /twentyseventeen/assets/js/global.js
can be changed to
if ( $menuScrollDown.length )
which would also allow $twentyseventeen_l10n['has_navigation']
to be completely removed from functions.php
Attachments (2)
Change History (13)
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
8 years ago
This ticket was mentioned in Slack in #core by helen. View the logs.
8 years ago
#9
@
8 years ago
@enodekciw your patch looked really good to me!
In 38502.1.patch I made two very minor formatting tweaks (removed a line break and an empty space at the end of one line.
I also added a fix for a issue that was noticed while testing - when there is no custom header image, the scroll down arrow should not appear next to the navigation on the front page. It should only be there when there's a big header.
Now that I had some time to catch up to recent code changes and dig deeper into this, seems that it might be a bit trickier to do this than I initially thought. Just changing the conditional doesn't make menu function as desired.
Decided to tinker with this tonight, attaching a patch. This is probably not the final version of the patch and will still need some tweaking, but might be something to work on.
Did some testing - works as intended (at least on my side).
Sorry, if I messed it up somehow - this is my first contribution using svn/trac.
P.S. I might not be able to update the patch myself, so feel free to take over.