Check for password protection before outputting content
This commit is contained in:
@@ -32,16 +32,16 @@ class SP_Template_Loader {
|
|||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
if ( $position <= 0 )
|
|
||||||
echo $content;
|
|
||||||
|
|
||||||
do_action( 'sportspress_before_single_' . $template );
|
|
||||||
|
|
||||||
if ( post_password_required() ) {
|
if ( post_password_required() ) {
|
||||||
echo get_the_password_form();
|
echo get_the_password_form();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( $position <= 0 )
|
||||||
|
echo $content;
|
||||||
|
|
||||||
|
do_action( 'sportspress_before_single_' . $template );
|
||||||
|
|
||||||
if ( $position > 0 && $position <= 5 )
|
if ( $position > 0 && $position <= 5 )
|
||||||
echo $content;
|
echo $content;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user