Display default shortcode format when format not set

This commit is contained in:
Brian Miyaji
2014-04-02 09:46:37 +11:00
parent eef5c14fbc
commit c284590f93
2 changed files with 4 additions and 2 deletions

View File

@@ -5,7 +5,7 @@
* @author ThemeBoy
* @category Admin
* @package SportsPress/Admin/Meta Boxes
* @version 0.7
* @version 0.7.4
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
@@ -20,6 +20,7 @@ class SP_Meta_Box_Calendar_Shortcode {
*/
public static function output( $post ) {
$the_format = get_post_meta( $post->ID, 'sp_format', true );
if ( ! $the_format ) $the_format = 'calendar';
?>
<p class="howto">
<?php _e( 'Copy this code and paste it into your post, page or text widget content.', 'sportspress' ); ?>

View File

@@ -5,7 +5,7 @@
* @author ThemeBoy
* @category Admin
* @package SportsPress/Admin/Meta Boxes
* @version 0.7
* @version 0.7.4
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
@@ -20,6 +20,7 @@ class SP_Meta_Box_List_Shortcode {
*/
public static function output( $post ) {
$the_format = get_post_meta( $post->ID, 'sp_format', true );
if ( ! $the_format ) $the_format = 'list';
?>
<p class="howto">
<?php _e( 'Copy this code and paste it into your post, page or text widget content.', 'sportspress' ); ?>