WordPress.org

Make WordPress Core

Opened 23 months ago

Closed 23 months ago

Last modified 23 months ago

#45231 closed defect (bug) (duplicate)

Twenty Nineteen: Localize script only when needed

Reported by: 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 23 months ago.
Move function into conditional that sets the var.

Download all attachments as: .zip

Change History (4)

@kraftbj
23 months ago

Move function into conditional that sets the var.

#1 @ocean90
23 months ago

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

Duplicate of #45224.

#2 @kraftbj
23 months 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.


23 months ago

Note: See TracTickets for help on using tickets.