From 3db92801aeea4fd7d4aaf8f9913281b9fb8fec7e Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Fri, 11 May 2018 14:10:26 +1000 Subject: [PATCH] Add missing parameters to sp_substr function --- includes/sp-core-functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/sp-core-functions.php b/includes/sp-core-functions.php index 596a3aa4..59dfeb47 100644 --- a/includes/sp-core-functions.php +++ b/includes/sp-core-functions.php @@ -123,11 +123,11 @@ function sp_locate_template( $template_name, $template_path = '', $default_path return apply_filters('sportspress_locate_template', $template, $template_name, $template_path); } -function sp_substr( $string = '' ) { +function sp_substr( $string = '', $start = 0, $length = null ) { if ( function_exists( 'mb_substr' ) ) { - return mb_substr( $string ); + return mb_substr( $string, $start, $length ); } else { - return substr( $string ); + return substr( $string, $start, $length ); } }