[wp-trac] [WordPress Trac] #63534: Add `link_to` label to post types
WordPress Trac
noreply at wordpress.org
Thu Jun 5 09:27:51 UTC 2025
#63534: Add `link_to` label to post types
-------------------------------+-----------------------------
Reporter: benoitchantre | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: trunk
Severity: normal | Keywords:
Focuses: ui |
-------------------------------+-----------------------------
In order to fix the Gutenberg issue 55057, we think the best way would be
to add a new label which could be used as it instead of using `sprintf`
{{{
<ToggleControl
__nextHasNoMarginBottom
label={
postType?.labels.singular_name
? sprintf(
// translators: %s: Name of the
post type e.g: "post".
__( 'Link to %s' ),
postType.labels.singular_name
)
: __( 'Link to post' )
}
onChange={ () =>
setAttributes( { isLink: ! isLink } )
}
checked={ isLink }
/>
}}}
https://github.com/WordPress/gutenberg/issues/55057
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63534>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list