HEX
Server: nginx/1.28.1
System: Linux iZgw8b5bpgd4jyptfmmmxgZ 6.6.102-5.2.alnx4.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Nov 27 23:11:10 CST 2025 x86_64
User: www (1000)
PHP: 8.2.28
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/www.scdc-marine.com/wp-content/themes/scdc-marine/TempParts/Single/single.php
<?php
// use  Heku\HekuClass\View\News;
/**
 * 单页详情页
 */

$custom_viewer_inline_script = '
window.addEventListener("DOMContentLoaded", function () {
	var single_info_galley = document.getElementById("single_info_content");
	var single_info_viewer = new Viewer(single_info_galley, {
	  url: "src",
	  toolbar:{
		oneToOne: false,
		play: false,
		prev: function() {
			single_info_viewer.prev(true);
		},
		next: function() {
			single_info_viewer.next(true);
		},
	  },
	  title:false,
	});
});';
wp_enqueue_script( 'heku-viewer', HEKU_THEME_URI . '/Assets/js/viewer.min.js' );
wp_add_inline_script( 'heku-viewer', $custom_viewer_inline_script, 'after' ); 

add_action('heku_footer_inline_js','footer_inline_js_html', 10);
function footer_inline_js_html(){
	wp_print_scripts('heku-viewer');
}
?>
	<!-- / star heku_top --> 
<?php get_template_part( "TempParts/Main/TopMenu/top_menu"); ?>
<?php get_template_part( "TempParts/Main/TopBanner/top_banner"); ?> 
 	<!-- / end heku_top -->

	<!-- / star single_bar_line -->
<?php get_template_part("TempParts/Main/Breadcrumb/breadcrumb"); ?> 
	<!-- / end single_bar_line -->

		<div id="single_main_line">
			<div class="container clearfix">
				<div class="row no-gutters">
					<div class="single-sidebar order-xl-first mr-xl-4">
						<!-- / star single_bar_line -->
<?php get_template_part("TempParts/Main/Sidebar/sidebar"); ?>
						<!-- / end single_bar_line -->
					</div>
					<div class="single-main col ml-xl-2">
						<div class="single-info heku-box no-gutters mb-4 wow slideInRight " >
							<div class="single-title"><?php echo get_the_title(); ?></div>
							<div class="single-meta-row pt-3 pb-2 d-flex justify-content-between">
								<ul class="single-meta-box">
									<li class="single-date"><span class="icon iconfont icon-time-3"></span><?php echo date('F',get_the_time('U')) . ' ' . get_the_time(' jS Y'); ?></li>
									<li class="single-eye"><span class="icon iconfont icon-a-13"></span><span><?php if(function_exists('the_views')) { the_views(); } ?> Views</span></li> 
								</ul>
								<ul class="single-tags-box">
									<?php 
									if (is_single()){
										$tags = wp_get_post_tags(get_the_id());
										$i = 0;
										foreach ($tags as $tag ) {
											$posts = get_posts( ['fields' => 'ids','posts_per_page' => -1,'post_type' => 'post','tax_query' => [['taxonomy' => 'post_tag','field'=> 'id','terms'=> $tag->term_taxonomy_id,],],] );
											$thumb_url = "/tag/" . $tag->slug;
											if( isset( $posts[0] ) &&( count($posts) == 1 ) ){
												$thumb_url = get_permalink($posts[0]);
											}
											if( $i++ < 2 ){ ?>
												<li class="single-tags-item" ><span class="icon iconfont icon-a-12"></span><a target="_blank" href="<?php echo $thumb_url; ?>"><?php echo $tag->name; ?></a></li> 
											<?php }
										}
									} ?>
								</ul>
							</div>
							<div id="single_info_content" >
								<div class="entry-content pt-2 pb-2">
									<?php the_content(); ?>
									<ul class="single-tags-box pt-2">
										<?php 
										if (is_single()){
											$tags = wp_get_post_tags(get_the_id());
											$i = 0;
											foreach ($tags as $tag ) {
												$posts = get_posts( ['fields' => 'ids','posts_per_page' => -1,'post_type' => 'post','tax_query' => [['taxonomy' => 'post_tag','field'=> 'id','terms'=> $tag->term_taxonomy_id,],],] );
												$thumb_url = "/tag/" . $tag->slug;
												if( isset( $posts[0] ) &&( count($posts) == 1 ) ){
													$thumb_url = get_permalink($posts[0]);
												}
												if( $i++ < 4 && $i > 1){ ?>
													<li class="single-tags-item" ><span class="icon iconfont icon-a-12"></span><a target="_blank" href="<?php echo $thumb_url; ?>"><?php echo $tag->name; ?></a></li> 
												<?php }
											}
										} ?>
									</ul>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>