-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Block: Post Navigation Link] Add an option for displaying the label inside the link #34952
Conversation
…itle and the label be a part of the link
Size Change: -599 B (0%) Total Size: 1.06 MB
ℹ️ View Unchanged
|
I was AFK, I will have a look asap |
I was not able to reproduce the problem. Here is some sample content for testing:
|
I don't know what was happening but now it works! Thank you for this Carolina! I have a nitpick (also not related to your code!) and it's that when the label is not a link, in the editor it's still wrapped around an anchor tag, and showing links styles. I'm happy if you want to merge this and we fix that elsewhere. I tried with emptytheme this time: |
$label = 'next' === $navigation_type ? _x( 'Next:', 'label before the title of the next post' ) : _x( 'Previous:', 'label before the title of the previous post' ); | ||
$link = sprintf( | ||
/* translators: 1: label. 2: post title */ | ||
__( '<span class="post-navigation-link__label">%1$s</span> <span class="post-navigation-link__title">%2$s</span>' ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 @carolinan @MaggieCabrera I was doing some translation work and run into this string. I'm not sure if I'm missing something but I don't see anything here that needs to be translated. Can we remove _()
from here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've create #35930
[Block: Post Navigation Link] Add the ability to have both the text title and the label be a part of the link
Closes #29032
Description
An option to include the label as part of the link is displayed when the display the title as a link option is enabled.
With the PR, the following scenarios will be possible:
How has this been tested?
Add a custom label and retest the options.
Types of changes
Enhancement
Checklist:
*.native.js
files for terms that need renaming or removal).