WordPress 6.7 Features: Font Library, Block Hooks, and HTML API

WordPress 6.7 for developers: template registration, block bindings UI and more

WordPress 6.7 (November 2024) introduced the theme Twenty Twenty-Five and the “Zoom Out” view for building pages from patterns. For developers, the interesting changes are an API to register block templates from a plugin, the block bindings interface in the editor, automatic sizes for lazy-loaded images, HEIC uploads and a few behavior changes that can affect existing code, among them the timing of translations.

Problem: A site still runs 6.6, and the team wants to know which changes of 6.7 need code changes in their theme and plugins, and which new APIs replace their own workarounds.

Solution: Check translations loaded too early (the new _load_textdomain_just_in_time notice), use register_block_template() for templates that a plugin ships, let editors connect block attributes to custom fields in the UI, and review the image output with the new sizes="auto".

Translations loaded too early: the notice

The most visible change for developers: 6.7 emits a “Function _load_textdomain_just_in_time was called incorrectly” notice when a plugin or theme calls a translation function (__(), esc_html__()) for its text domain before the init action, for example in the main plugin file or in plugins_loaded. Translations loaded that early can be loaded before the user’s locale is known.

// before: a translated string at load time
$GLOBALS['ha_labels'] = array( 'title' => __( 'Bookings', 'textdomain' ) );

// after: translate when the value is needed, on init or later
add_action( 'init', function (): void {
    $GLOBALS['ha_labels'] = array( 'title' => __( 'Bookings', 'textdomain' ) );
} );

Typical sources are labels in class constructors that run on plugins_loaded, and register_post_type() called too early. The notice appears only with WP_DEBUG on.

Block templates from a plugin

add_action( 'init', function (): void {
    register_block_template( 'ha-events//single-ha_event', array(
        'title'       => __( 'Single event', 'textdomain' ),
        'description' => __( 'Shows one event with date and venue.', 'textdomain' ),
        'content'     => file_get_contents( __DIR__ . '/templates/single-ha_event.html' ),
    ) );
} );

Before 6.7, plugins had to filter get_block_templates to inject templates into block themes. The ID is plugin-slug//template-slug; the template appears in the Site Editor and can be customized there like a theme template. The theme can still override it with its own single-ha_event.html.

Block bindings in the editor

The Block Bindings API (6.5) connects block attributes to data sources such as post meta. In 6.7, editors can create these connections in the block’s sidebar (the “Attributes” panel) for paragraphs, headings, images and buttons, as long as the meta field is registered with show_in_rest and has a label:

register_post_meta( 'ha_event', 'ha_venue', array(
    'type'         => 'string',
    'single'       => true,
    'show_in_rest' => true,
    'label'        => __( 'Venue', 'textdomain' ),
) );

Images: sizes=”auto”

For images with loading="lazy", 6.7 adds auto to the start of the sizes attribute. Browsers that support it (Chrome 126+) then choose the source from the image’s rendered width instead of the theme’s guessed sizes value, which often downloads smaller files. Themes that filter wp_calculate_image_sizes keep working; their value stays as the fallback after auto,. Code that parses sizes in HTML should not assume it starts with a media query.

Smaller changes worth knowing

  • HEIC uploads are converted to JPEG automatically when the server’s ImageMagick supports HEIC.
  • Meta boxes in the post editor can now be shown together with an iframed editor canvas; classic meta boxes no longer force the old non-iframed editor in all cases.
  • The Preview Options API lets plugins add entries to the editor’s Preview dropdown.

NOTE: WordPress 6.8 followed in April 2025 with speculative loading (prefetching links the visitor is about to click) and bcrypt for password hashes. Code that reads password hashes from the database directly, for example for single sign-on, must handle the new $wp$2y$ prefix. The 6.4 release with Block Hooks and admin notice functions: WordPress 6.4 for developers.