Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#45231 closed defect (bug) (duplicate)

Twenty Nineteen: Localize script only when needed

Reported by: kraftbj's profile kraftbj Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords: has-patch
Focuses: Cc:

Description

In functions.php of Twenty Nineteen, wp_localize_script( 'twentynineteen-skip-link-focus-fix', 'twentynineteenScreenReaderText', $twentynineteen_l10n ); is executed whether or not $twentynineteen_l10n has been set, resulting in a NOTICE: wp-content/themes/twentynineteen/functions.php:167 - Undefined variable: twentynineteen_l10n on sites without nav menus.

Patch incoming.

Attachments (1)

45231.diff (1.0 KB) - added by kraftbj 6 years ago.
Move function into conditional that sets the var.

Download all attachments as: .zip

Change History (4)

@kraftbj
6 years ago

Move function into conditional that sets the var.

#1 @ocean90
6 years ago

  • Milestone 5.0 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #45224.

#2 @kraftbj
6 years ago

Sorry for the noise @ocean90. I checked the latest tickets view, but since it was closed, it didn't show for me. I mistakenly figured since it had been merged over, tickets would go here now. Apologies!

This ticket was mentioned in Slack in #meta by kraft. View the logs.


6 years ago

Note: See TracTickets for help on using tickets.