Making WordPress.org


Ignore:
Timestamp:
09/08/2021 01:07:57 AM (3 years ago)
Author:
dd32
Message:

Openverse: Update the theme to pass the locale.

Fixes #5892.
Closes https://github.com/WordPress/wordpress.org/pull/39

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-openverse/functions.php

    r11060 r11217  
    8686    wp_add_inline_script(
    8787        /* handle   */ 'openverse-message',
    88         /* JS       */ 'const openverseUrl = ' . json_encode( get_theme_mod( 'ov_src_url', OPENVERSE_URL ) ) . ";\n" .
    89         /* JS       */ 'const openverseSubpath = ' . json_encode( OPENVERSE_SUBPATH ) . ";\n",
     88        /* JS       */ 'const openverseUrl = ' . wp_json_encode( get_theme_mod( 'ov_src_url', OPENVERSE_URL ) ) . ";\n" .
     89        /* JS       */ 'const openverseSubpath = ' . wp_json_encode( OPENVERSE_SUBPATH ) . ";\n" .
     90        /* JS       */ 'const currentLocale = ' . wp_json_encode( get_locale() ) . ";\n",
    9091        /* position */ 'before'
    9192    ); 
Note: See TracChangeset for help on using the changeset viewer.