diff --git a/includes/sp-core-functions.php b/includes/sp-core-functions.php index 9f6e7966..6a7229bc 100644 --- a/includes/sp-core-functions.php +++ b/includes/sp-core-functions.php @@ -7,7 +7,7 @@ * @author ThemeBoy * @category Core * @package SportsPress/Functions - * @version 1.3 + * @version 1.3.2 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly @@ -896,14 +896,14 @@ if ( !function_exists( 'sp_post_adder' ) ) { } if ( !function_exists( 'sp_taxonomy_adder' ) ) { - function sp_taxonomy_adder( $taxonomy = 'category', $post_type = 'post', $label = null ) { + function sp_taxonomy_adder( $taxonomy = 'category', $post_type = null, $label = null ) { $obj = get_taxonomy( $taxonomy ); if ( $label == null ) $label = __( 'Add New', 'sportspress' ); ?>

- + +

@@ -1068,8 +1068,8 @@ if ( !function_exists( 'sp_get_next_event' ) ) { 'meta_query' => $args, ); $posts = get_posts( $options ); - $post = array_pop( $posts ); - return $post; + if ( $posts && is_array( $posts ) ) return array_pop( $posts ); + else return false; } } @@ -1111,5 +1111,15 @@ function sp_get_text_options() { )); asort( $strings ); - return $strings; + return array_unique( $strings ); +} + +function sp_review_link() { + ?> +

+ + + +

+