Prevent modifications to read_more affecting dashboard expected behavior

This commit is contained in:
William Patton 2018-10-12 23:16:53 +01:00
parent 0dbfc1728a
commit 607072acd1
1 changed files with 10 additions and 5 deletions

View File

@ -110,7 +110,10 @@ if ( ! function_exists( 'understrap_custom_excerpt_more' ) ) {
* @return string * @return string
*/ */
function understrap_custom_excerpt_more( $more ) { function understrap_custom_excerpt_more( $more ) {
return ''; if ( ! is_admin() ) {
$more = '';
}
return $more;
} }
} }
@ -125,8 +128,10 @@ if ( ! function_exists( 'understrap_all_excerpts_get_more_link' ) ) {
* @return string * @return string
*/ */
function understrap_all_excerpts_get_more_link( $post_excerpt ) { function understrap_all_excerpts_get_more_link( $post_excerpt ) {
if ( ! is_admin() ) {
return $post_excerpt . ' [...]<p><a class="btn btn-secondary understrap-read-more-link" href="' . esc_url( get_permalink( get_the_ID() )) . '">' . __( 'Read More...', $post_excerpt = $post_excerpt . ' [...]<p><a class="btn btn-secondary understrap-read-more-link" href="' . esc_url( get_permalink( get_the_ID() ) ) . '">' . __( 'Read More...',
'understrap' ) . '</a></p>'; 'understrap' ) . '</a></p>';
} }
return $post_excerpt;
}
} }