403Webshell
Server IP : 104.26.3.156  /  Your IP : 216.73.216.185
Web Server : nginx/1.27.1
System : Linux us-1 5.15.0-131-generic #141-Ubuntu SMP Fri Jan 10 21:18:28 UTC 2025 x86_64
User : vinodai ( 3134)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /storage/v1396/wwwindicidolscom/public_html/wp-content/themes/shakti/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /storage/v1396/wwwindicidolscom/public_html/wp-content/themes/shakti/single.php
<?php
/**
 * The template to display single post
 *
 * @package SHAKTI
 * @since SHAKTI 1.0
 */

// Full post loading
$full_post_loading          = shakti_get_value_gp( 'action' ) == 'full_post_loading';

// Prev post loading
$prev_post_loading          = shakti_get_value_gp( 'action' ) == 'prev_post_loading';
$prev_post_loading_type     = shakti_get_theme_option( 'posts_navigation_scroll_which_block' );

// Position of the related posts
$shakti_related_position   = shakti_get_theme_option( 'related_position' );

// Type of the prev/next post navigation
$shakti_posts_navigation   = shakti_get_theme_option( 'posts_navigation' );
$shakti_prev_post          = false;
$shakti_prev_post_same_cat = shakti_get_theme_option( 'posts_navigation_scroll_same_cat' );

// Rewrite style of the single post if current post loading via AJAX and featured image and title is not in the content
if ( ( $full_post_loading 
		|| 
		( $prev_post_loading && 'article' == $prev_post_loading_type )
	) 
	&& 
	! in_array( shakti_get_theme_option( 'single_style' ), array( 'style-6' ) )
) {
	shakti_storage_set_array( 'options_meta', 'single_style', 'style-6' );
}

do_action( 'shakti_action_prev_post_loading', $prev_post_loading, $prev_post_loading_type );

get_header();

while ( have_posts() ) {

	the_post();

	// Type of the prev/next post navigation
	if ( 'scroll' == $shakti_posts_navigation ) {
		$shakti_prev_post = get_previous_post( $shakti_prev_post_same_cat );  // Get post from same category
		if ( ! $shakti_prev_post && $shakti_prev_post_same_cat ) {
			$shakti_prev_post = get_previous_post( false );                    // Get post from any category
		}
		if ( ! $shakti_prev_post ) {
			$shakti_posts_navigation = 'links';
		}
	}

	// Override some theme options to display featured image, title and post meta in the dynamic loaded posts
	if ( $full_post_loading || ( $prev_post_loading && $shakti_prev_post ) ) {
		shakti_sc_layouts_showed( 'featured', false );
		shakti_sc_layouts_showed( 'title', false );
		shakti_sc_layouts_showed( 'postmeta', false );
	}

	// If related posts should be inside the content
	if ( strpos( $shakti_related_position, 'inside' ) === 0 ) {
		ob_start();
	}

	// Display post's content
	get_template_part( apply_filters( 'shakti_filter_get_template_part', 'templates/content', 'single-' . shakti_get_theme_option( 'single_style' ) ), 'single-' . shakti_get_theme_option( 'single_style' ) );

	// If related posts should be inside the content
	if ( strpos( $shakti_related_position, 'inside' ) === 0 ) {
		$shakti_content = ob_get_contents();
		ob_end_clean();

		ob_start();
		do_action( 'shakti_action_related_posts' );
		$shakti_related_content = ob_get_contents();
		ob_end_clean();

		if ( ! empty( $shakti_related_content ) ) {
			$shakti_related_position_inside = max( 0, min( 9, shakti_get_theme_option( 'related_position_inside' ) ) );
			if ( 0 == $shakti_related_position_inside ) {
				$shakti_related_position_inside = mt_rand( 1, 9 );
			}

			$shakti_p_number         = 0;
			$shakti_related_inserted = false;
			$shakti_in_block         = false;
			$shakti_content_start    = strpos( $shakti_content, '<div class="post_content' );
			$shakti_content_end      = strrpos( $shakti_content, '</div>' );

			for ( $i = max( 0, $shakti_content_start ); $i < min( strlen( $shakti_content ) - 3, $shakti_content_end ); $i++ ) {
				if ( $shakti_content[ $i ] != '<' ) {
					continue;
				}
				if ( $shakti_in_block ) {
					if ( strtolower( substr( $shakti_content, $i + 1, 12 ) ) == '/blockquote>' ) {
						$shakti_in_block = false;
						$i += 12;
					}
					continue;
				} else if ( strtolower( substr( $shakti_content, $i + 1, 10 ) ) == 'blockquote' && in_array( $shakti_content[ $i + 11 ], array( '>', ' ' ) ) ) {
					$shakti_in_block = true;
					$i += 11;
					continue;
				} else if ( 'p' == $shakti_content[ $i + 1 ] && in_array( $shakti_content[ $i + 2 ], array( '>', ' ' ) ) ) {
					$shakti_p_number++;
					if ( $shakti_related_position_inside == $shakti_p_number ) {
						$shakti_related_inserted = true;
						$shakti_content = ( $i > 0 ? substr( $shakti_content, 0, $i ) : '' )
											. $shakti_related_content
											. substr( $shakti_content, $i );
					}
				}
			}
			if ( ! $shakti_related_inserted ) {
				if ( $shakti_content_end > 0 ) {
					$shakti_content = substr( $shakti_content, 0, $shakti_content_end ) . $shakti_related_content . substr( $shakti_content, $shakti_content_end );
				} else {
					$shakti_content .= $shakti_related_content;
				}
			}
		}

		shakti_show_layout( $shakti_content );
	}

	// Comments
	do_action( 'shakti_action_before_comments' );
	comments_template();
	do_action( 'shakti_action_after_comments' );

	// Related posts
	if ( 'below_content' == $shakti_related_position
		&& ( 'scroll' != $shakti_posts_navigation || shakti_get_theme_option( 'posts_navigation_scroll_hide_related' ) == 0 )
		&& ( ! $full_post_loading || shakti_get_theme_option( 'open_full_post_hide_related' ) == 0 )
	) {
		do_action( 'shakti_action_related_posts' );
	}

	// Post navigation: type 'scroll'
	if ( 'scroll' == $shakti_posts_navigation && ! $full_post_loading ) {
		?>
		<div class="nav-links-single-scroll"
			data-post-id="<?php echo esc_attr( get_the_ID( $shakti_prev_post ) ); ?>"
			data-post-link="<?php echo esc_attr( get_permalink( $shakti_prev_post ) ); ?>"
			data-post-title="<?php the_title_attribute( array( 'post' => $shakti_prev_post ) ); ?>"
			<?php do_action( 'shakti_action_nav_links_single_scroll_data', $shakti_prev_post ); ?>
		></div>
		<?php
	}
}

get_footer();

Youez - 2016 - github.com/yon3zu
LinuXploit