Üst

Rss Beslenme The Developer’s Guide to WordPress 6.8

Puan 1
Çözümler 0
Katılım
19 Mar 2025
Tepkime puanı
0
Web sitesi
xenwp.com
XenWp BotXenWp Bot Doğrulanmış Kullanıcı
Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
, codenamed “Cecil,” includes loads of goodies for developers to tinker with. As usual, I’m like an overwhelmed toddler in a toy shop, just trying to figure out which toy I want to take for a test spin first.

The 6.8 update touched many areas of the WordPress Core code, including everything from the block library to performance to patterns. Plus, there are plenty of other quality-of-life improvements in 6.8 for anyone building plugins and themes.

Without further ado, let’s jump straight into them.

For detailed information on each development change, check out the official
Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
on the Make WordPress Core blog.

  1. Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
  2. Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
  3. Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
    1. Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
    2. Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
    3. Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
    4. Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
    5. Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
  4. Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
  5. Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
    1. Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
    2. Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
  6. Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
    1. Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
    2. Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
  7. Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
  8. Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
    1. Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
    2. Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
    3. Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
  9. Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.

More performant block type registration​


WordPress 6.8 eliminates the need to manually register block types thanks to its new wp_register_block_types_from_metadata_collection() function. It is a wrapper for the blocks-manifest.php file and the wp_register_block_metadata_collection() function introduced in WordPress 6.7.

Because all of the block data is stored as PHP in blocks-manifest.php, you can register all of your plugin’s block types without reading individual JSON files. Overall, it’s just a more efficient way to register block types—and yes, you can use it for registering single block types, too!

In WordPress 6.8, you can register all of your block types with this call:



wp_register_block_types_from_metadata_collection(
__DIR__ . '/build',
__DIR__ . '/build/blocks-manifest.php'
);

Read the
Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
for more information or to find out how to use this in a backward-compatible way when supporting older versions of WordPress.

Style Book sections and more​

The Typography Style Book page on WordPress showing typesets on the left and heading stylings on the right


One of the biggest improvements in 6.8 is the interface update to the Style Book, which separates your style settings into
Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
. Shown in the screenshot above, you can see how selecting a typeset makes it easier to test and preview your site’s typography.

There are also a couple of other notable upgrades to the Style Book. It now
Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
, which lets you link directly to it. The new URL path is /wp-admin/site-editor.php?p=%2Fstyles&preview=stylebook. Additionally, Style Book support was
Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
.

Block Library updates​


Between new blocks and additional ways to use existing blocks, WordPress 6.8 brings useful enhancements to the Block Library that expand what you can build and how you build it.

New block: Query Total​

Orange boxes highlighting total results and range display from the Query Total block in WordPress


WordPress 6.8 ships a new block for sharing information to visitors about the current posts query:
Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
. It should be used inside an existing
Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
and has two display options:

  • Total results, which displays the total number of query results found.
  • Range display, which shows the current results you’re looking at in the total results range.

Gallery lightbox​

An orange box highlighting the expand on click setting in WordPress


WordPress 6.8 brings the
Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
The feature is the same as it already works for individual
Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
. You set the lightbox effect at the
Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
level by clicking on the Link button in the toolbar and selecting the Enlarge on click option.

It’s worth noting that this feature does not create a lightbox slideshow where you can scroll through all images for the Gallery; it merely applies the existing lightbox feature to the individual Image blocks.

Details block​

a heading and description in a WordPress details block


You can now
Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
via the name HTML attribute. When multiple <details> elements share the same name, browsers will automatically close an open element when another is opened, creating an accordion effect. You can set the name attribute under Advanced → Name Attribute in the block inspector sidebar.

The Details block also gained
Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
in WordPress 6.8. It is located under Advanced → HTML Anchor.

Nice-to-have feature additions​


WordPress 6.8 boasts smaller feature additions to several other blocks, including:

  • The Navigation Link block now
    Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
    within the link content.
  • The
    Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
    can now be set to a <div> element
    Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
    (the default <hr> is meant for an actual thematic break in the content).
  • The
    Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
    now
    Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
    so you can use it for locked patterns while allowing the user to still edit it.
  • The
    Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
    can now be
    Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
    (also possible when
    Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
    ).
  • The Social Link block now has a
    Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
    and an associated icon.
  • The
    Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
    gained a couple of nice additions:
    • You can
      Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
      in either ascending or descending order.
    • You can also
      Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
      for custom queries.

Notable block CSS changes​


WordPress 6.8 includes a couple of CSS-related changes that are unlikely to break theme designs, but they are worth noting as general improvements:

  • The Buttons block now has box-sizing: border-box applied, which
    Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
    .
  • The
    Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
    are now handled via a data-wp-bind--style directive rather than an inline <style> tag.

Design tools extended to more blocks​


Many Core blocks received much-needed design tool updates, improving consistency in block styling options.

In this context, design tool support means that the supported options appear for these blocks in the editor UI. Even if a block doesn’t support the tool, you can still configure the associated styles via theme.json.

The Archives, Category, Content, and Page List blocks now support more color tools. Many blocks also gained border support:

  • Archives
  • Comments
  • Comments Link
  • Comments Count
  • Content
  • Latest Posts
  • Page List
  • Query Total
  • RSS

The Content, Page List, and RSS blocks also now support spacing design tools.

For a full list of design tools support, check out the
Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
.

Organizing patterns​


Developers can now organize patterns in more intuitive, straightforward ways.

Add patterns to subfolders​


If you ship a lot of patterns with your theme, you may have been frustrated with a seemingly endless, unorganized list under your /patterns folder.

With WordPress 6.8, you can organize your
Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
under /patterns, making navigation more straightforward.

For example, you may separate header and footer patterns in your theme folder like so:



/patterns
/header
centered.php
default.php
/footer
default.php
links.php

Starter patterns category​


In the UI, patterns that have been assigned to the core/post-content block type (the method for registering a starter pattern) appear under
Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
. This goes hand-in-hand with another update that
Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
.

Content creators who want to prevent the Starter Content modal from appearing for every new page can disable it with a toggle switch on the bottom of the modal or via the Editor → 3-dot-menu → Preferences screen.

With the new version, theme developers can add
Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
: posts, pages, and any registered custom post types.

API updates​


WordPress 6.8 introduces several API-level improvements aimed at making development more robust and extensible. These changes enhance how developers interact with data, insert blocks, and work with patterns.

Interactivity​


The wp-each directive has been improved to better handle data by first
Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
instead of attempting to call its .map method directly. This will avoid errors when non-iterable values are used.

You can find
Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
for the 6.8 release on the Make WordPress Core blog. Following these best practices will help keep your code up to date with the latest standards and set you up better for future iterations of the API.

Block Hooks​


The Block Hooks API received two major updates. The first extends the Block Hooks mechanism to post content, allowing you to dynamically insert hooked blocks
Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
. The second update lets Block Hooks
Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
.

Security: switched to bcrypt for password hashing​


The algorithm that WordPress uses to hash and store user passwords in the database
Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
.

It previously used phpass, but the adoption of bcrypt strengthens password security by requiring significantly more computational power to crack password hashes.

If your plugin uses the wp_hash_password() or wp_check_password() functions, it should continue working as expected. However, if you were directly handling phpass hashes, you would need to update your code.

Read the
Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
for more details. The post also provides details on the new wp_fast_hash() and wp_verify_fast_hash() functions for hashing a randomly generated string with sufficient entropy.

Performance improvements​


Finally, WordPress 6.8 brings some helpful performance improvements to all sites.

Speculative loading​


WordPress 6.8 introduces
Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
, which lets supporting browsers prefetch or prerender URLs. It can lead to almost instant page load times since they are loaded before the user navigates to them.

This feature was initially
Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
as the Speculative Loading plugin. Since then, contributors have refined the code until it was ready for inclusion in WordPress Core.

The new feature comes with several filter hooks for you to modify how speculative loading works:

  • wp_speculation_rules_href_exclude_paths: For excluding URL patterns from speculative loading.
  • wp_speculation_rules_configuration: For modifying the speculative loading configuration.
  • wp_load_speculation_rules: For including additional speculative loading rules.

useSelect performance warning​


When you have SCRIPT_DEBUG enabled (as is common practice in development), WordPress will now
Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
in the console when useSelect is used to unnecessarily re-render. This change will benefit anyone extending the block editor and help them write more performant code.

Filter hook for loading block assets on demand​


Before WordPress 6.8, the should_load_separate_block_assets filter hook had two responsibilities:

  1. To load separate stylesheets for Core blocks instead of always loading the combined wp-block-library stylesheet containing all block CSS
  2. To load scripts and styles on demand based on whether they are used on a particular page

In 6.8, a new filter hook named should_load_block_assets_on_demand exists for the second purpose of
Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
. The original hook will work as before, but it’s recommended to filter it only to override whether stylesheets should be separated.

What will you build with WordPress 6.8?​


WordPress 6.8 continues to move the WordPress software forward with cleaner APIs, improved performance, and better tools for site building. Whether you’re shipping themes, maintaining a plugin, or just exploring what’s possible with the block editor, this release will make your workflows more efficient and your code easier to maintain.

Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
, all of this is available to you automatically—no version management required. You get the latest features, developer tools like SSH and GitHub deployments, and a fully managed environment that stays out of your way so you can focus on shipping.

Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.


Bu bağlantı ziyaretçiler için gizlenmiştir. Görmek için lütfen giriş yapın veya üye olun.
 

Konuyu toplam 0 üye okuyor. (0 Kayıtlı üye ve 0 Misafir)

Geri