From b2e336e2e8af7b27316a519d00baeb10e8d20f95 Mon Sep 17 00:00:00 2001 From: Alex Wright Date: Fri, 30 Mar 2018 11:28:55 -0500 Subject: [PATCH] Add pluggable function wrappers to inc/setup.pphp --- inc/setup.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/inc/setup.php b/inc/setup.php index f4cab44..dc74ac5 100644 --- a/inc/setup.php +++ b/inc/setup.php @@ -11,7 +11,9 @@ if ( ! isset( $content_width ) ) { $content_width = 640; /* pixels */ } -if ( ! function_exists( 'understrap_setup' ) ) : +add_action( 'after_setup_theme', 'understrap_setup' ); + +if ( ! function_exists ( 'understrap_setup' ) ) { /** * Sets up theme defaults and registers support for various WordPress features. * @@ -91,8 +93,10 @@ if ( ! function_exists( 'understrap_setup' ) ) : understrap_setup_theme_default_settings(); } -endif; // understrap_setup. -add_action( 'after_setup_theme', 'understrap_setup' ); +} + + +add_filter( 'excerpt_more', 'understrap_custom_excerpt_more' ); if ( ! function_exists( 'understrap_custom_excerpt_more' ) ) { /** @@ -106,7 +110,8 @@ if ( ! function_exists( 'understrap_custom_excerpt_more' ) ) { return ''; } } -add_filter( 'excerpt_more', 'understrap_custom_excerpt_more' ); + +add_filter( 'wp_trim_excerpt', 'understrap_all_excerpts_get_more_link' ); if ( ! function_exists( 'understrap_all_excerpts_get_more_link' ) ) { /** @@ -121,5 +126,4 @@ if ( ! function_exists( 'understrap_all_excerpts_get_more_link' ) ) { return $post_excerpt . ' [...]

' . __( 'Read More...', 'understrap' ) . '

'; } -} -add_filter( 'wp_trim_excerpt', 'understrap_all_excerpts_get_more_link' ); +} \ No newline at end of file