Merge pull request #1161 from Automattic/update-single-post-nav

Add "Next/Previous" text to single-post navigation
This commit is contained in:
Ismail El Korchi 2020-04-17 22:38:12 +01:00 committed by GitHub
commit fce04b6b4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 6 deletions

View File

@ -9,7 +9,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2020-04-10T15:22:10+00:00\n" "POT-Creation-Date: 2020-04-17T21:03:15+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.4.0\n" "X-Generator: WP-CLI 2.4.0\n"
"X-Domain: _s\n" "X-Domain: _s\n"
@ -86,11 +86,11 @@ msgstr ""
msgid "Primary" msgid "Primary"
msgstr "" msgstr ""
#: functions.php:128 #: functions.php:130
msgid "Sidebar" msgid "Sidebar"
msgstr "" msgstr ""
#: functions.php:130 #: functions.php:132
msgid "Add widgets here." msgid "Add widgets here."
msgstr "" msgstr ""
@ -146,12 +146,12 @@ msgstr ""
msgid "Edit <span class=\"screen-reader-text\">%s</span>" msgid "Edit <span class=\"screen-reader-text\">%s</span>"
msgstr "" msgstr ""
#: inc/woocommerce.php:227 #: inc/woocommerce.php:186
msgid "View your shopping cart" msgid "View your shopping cart"
msgstr "" msgstr ""
#. translators: number of items in the mini cart. #. translators: number of items in the mini cart.
#: inc/woocommerce.php:231 #: inc/woocommerce.php:190
msgid "%d item" msgid "%d item"
msgid_plural "%d items" msgid_plural "%d items"
msgstr[0] "" msgstr[0] ""
@ -162,6 +162,14 @@ msgstr[1] ""
msgid "Search Results for: %s" msgid "Search Results for: %s"
msgstr "" msgstr ""
#: single.php:23
msgid "Previous:"
msgstr ""
#: single.php:24
msgid "Next:"
msgstr ""
#: template-parts/content-none.php:14 #: template-parts/content-none.php:14
msgid "Nothing Found" msgid "Nothing Found"
msgstr "" msgstr ""

View File

@ -19,7 +19,12 @@ get_header();
get_template_part( 'template-parts/content', get_post_type() ); get_template_part( 'template-parts/content', get_post_type() );
the_post_navigation(); the_post_navigation(
array(
'prev_text' => '<span class="nav-subtitle">' . esc_html__( 'Previous:', '_s' ) . '</span> <span class="nav-title">%title</span>',
'next_text' => '<span class="nav-subtitle">' . esc_html__( 'Next:', '_s' ) . '</span> <span class="nav-title">%title</span>',
)
);
// If comments are open or we have at least one comment, load up the comment template. // If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) : if ( comments_open() || get_comments_number() ) :