Make WordPress Core

Changeset 56496

Timestamp:
08/30/2023 10:09:20 PM (11 months ago)
Author:
audrasjb
Message:

Editor: Add relative time strings for the wp-date inline script output.

This changeset updates wp_default_packages_inline_scripts() to add relative time strings to the wp-date inline script, so the JS version of human_time_diff
can output translated strings.

Props ramonopoly, oandregal, swissspidy, manzoorwanijk, adrianduffell, Presskopp.
Fixes #59219, #47373.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r56481 r56496  
    330330 *
    331331 * @since 5.0.0
     332
    332333 *
    333334 * @global WP_Locale $wp_locale WordPress date and time locale object.
     
    431432                            /* translators: %s: Duration. */
    432433                            'past'   => __( '%s ago' ),
     434
     435
     436
     437
     438
     439
     440
     441
     442
     443
     444
     445
     446
     447
     448
     449
     450
     451
     452
     453
     454
     455
     456
     457
    433458                        ),
    434459                        'startOfWeek'   => (int) get_option( 'start_of_week', 0 ),
Note: See TracChangeset for help on using the changeset viewer.