publish );
$post_type = get_post_type_object( $type );
$text = _n( '%s ' . $post_type->labels->singular_name, '%s ' . $post_type->labels->name, $published, 'sportspress' );
$text = sprintf( $text, number_format_i18n( $published ) );
if ( current_user_can( $post_type->cap->edit_posts ) ):
$output = '' . $text . '';
else:
$output = '' . $text . '';
endif;
echo '
' . $output . '';
endif;
endforeach;
return $items;
}
/**
* Show status widget
*/
public function status_widget() {
?>
future ) ? $count->future : 0;
$published_count = isset( $count->publish ) ? $count->publish : 0;
$next_event = sp_get_next_event();
if ( $next_event ):
$now = new DateTime( current_time( 'mysql', 0 ) );
$date = new DateTime( $next_event->post_date );
$interval = date_diff( $now, $date );
?>
-
%s until next event', 'sportspress' ), $interval->days . ' ' . __( 'days', 'sportspress' ) . ' ' . sprintf( '%02s:%02s:%02s', $interval->h, $interval->i, $interval->s ) ); ?>
(post_title; ?>)
-
%s event scheduled', '%s events scheduled', $scheduled_count, 'sportspress' ), $scheduled_count ); ?>
-
%s event published', '%s events published', $published_count, 'sportspress' ), $published_count ); ?>