updated theme GeneratePress version 3.4.0

This commit is contained in:
2024-02-08 12:32:18 +00:00
committed by Gitium
parent 0a68b68387
commit ebadc7fb45
30 changed files with 158 additions and 125 deletions

View File

@ -453,12 +453,8 @@ if ( ! function_exists( 'generate_excerpt_more' ) ) {
' ... <a title="%1$s" class="read-more" href="%2$s" aria-label="%4$s">%3$s</a>',
the_title_attribute( 'echo=0' ),
esc_url( get_permalink( get_the_ID() ) ),
__( 'Read more', 'generatepress' ),
sprintf(
/* translators: Aria-label describing the read more button */
_x( 'More on %s', 'more on post title', 'generatepress' ),
the_title_attribute( 'echo=0' )
)
generate_get_read_more_text(),
generate_get_read_more_aria_label()
)
);
}
@ -481,12 +477,8 @@ if ( ! function_exists( 'generate_content_more' ) ) {
'<p class="read-more-container"><a title="%1$s" class="read-more content-read-more" href="%2$s" aria-label="%4$s">%3$s</a></p>',
the_title_attribute( 'echo=0' ),
esc_url( get_permalink( get_the_ID() ) . apply_filters( 'generate_more_jump', '#more-' . get_the_ID() ) ),
__( 'Read more', 'generatepress' ),
sprintf(
/* translators: Aria-label describing the read more button */
_x( 'More on %s', 'more on post title', 'generatepress' ),
the_title_attribute( 'echo=0' )
)
generate_get_read_more_text(),
generate_get_read_more_aria_label()
)
);
}
@ -577,3 +569,31 @@ function generate_do_post_navigation( $template ) {
generate_content_nav( 'nav-below' );
}
}
/**
* Returns the read more text for our posts.
*
* @since 3.4.0
*/
function generate_get_read_more_text() {
return apply_filters(
'generate_excerpt_more_text',
__( 'Read more', 'generatepress' )
);
}
/**
* Returns the read more `aria-label` for our posts.
*
* @since 3.4.0
*/
function generate_get_read_more_aria_label() {
return apply_filters(
'generate_excerpt_more_aria_label',
sprintf(
/* translators: Aria-label describing the read more button */
_x( 'Read more about %s', 'read more about post title', 'generatepress' ),
the_title_attribute( 'echo=0' )
)
);
}