From 87094c95ecfd1afc260d28b4769aeab49262808e Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Sun, 25 Jan 2015 16:39:49 +1100 Subject: [PATCH] Add API function for abbreviations --- includes/sp-api-functions.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/includes/sp-api-functions.php b/includes/sp-api-functions.php index 590c1e1a..481c3a20 100644 --- a/includes/sp-api-functions.php +++ b/includes/sp-api-functions.php @@ -131,6 +131,14 @@ function sp_get_logo( $post = 0, $size = 'icon', $attr = array() ) { return get_the_post_thumbnail( $post, 'sportspress-fit-' . $size, $attr ); } +function sp_get_abbreviation( $post = 0 ) { + return get_post_meta ( $post, 'sp_abbreviation', true ); +} + +function sp_the_abbreviation( $post = 0 ) { + echo sp_get_abbreviation( $post ); +} + function sp_the_logo( $post = 0, $size = 'icon', $attr = array() ) { echo sp_get_logo( $post, $size, $attr ); }