Check for password protection before outputting content

This commit is contained in:
Brian Miyaji
2015-07-29 21:33:45 +10:00
parent 5e48efd3c2
commit e24c1aad9f

View File

@@ -32,16 +32,16 @@ class SP_Template_Loader {
ob_start();
if ( $position <= 0 )
echo $content;
do_action( 'sportspress_before_single_' . $template );
if ( post_password_required() ) {
echo get_the_password_form();
return;
}
if ( $position <= 0 )
echo $content;
do_action( 'sportspress_before_single_' . $template );
if ( $position > 0 && $position <= 5 )
echo $content;