HEX
Server: nginx/1.16.1
System: Linux VM-0-14-centos 4.18.0-348.7.1.el8_5.x86_64 #1 SMP Wed Dec 22 13:25:12 UTC 2021 x86_64
User: www (1000)
PHP: 8.3.31
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.sceybwg.com/wp-content/themes/Modular/template/module-page/theme-download.php
<?php
/**
 * Template: 时间轴
 * @Author: 大胡子
 * @Email:  dahuzi@xintheme.com
 * @Link:   www.xintheme.com
 * @Date:   2023-08-01 07:27:28
 * @Last Modified by:   dahuzi
 * @Last Modified time: 2024-08-28 16:25:57
 */

if(is_array($module_content)){?>


<div class="section"<?php if( !empty($module_setting['module_bg']) ){ echo ' style="background:url('.$module_setting['module_bg'].') no-repeat center 0 / cover;"';}?>>
	<div class="container">
		<?php
		if( !empty($module_setting['title_display']) ){?>
		<div class="section-title <?php echo $wow_style;?><?php if( !empty($module_setting['module_bg']) ){ echo ' text-colour-white';}?>">
            <?php
            if( !empty($module_title) ){
            echo '<strong>'.$module_title.'</strong>';
            }
            if( !empty($module_desc) ){
            echo '<p>'.$module_desc.'</p>';
            }
            ?>
        </div>
        <?php }?>

        <div class="list-six <?php if( !empty($module_setting['contact_style']) ){ echo $module_setting['contact_style'];}?>">
            <?php
            if( !empty($module_content['download_id']) ){
                // 获取指定 ID 的文章
                $downloadArray = array(
                    'post_type' => 'download',
                    'post__in' => $module_content['download_id'],
                    'orderby' => 'post__in',
                );

                $download_query = wpjam_query($downloadArray);
                if ($download_query->have_posts()) {
                    while ($download_query->have_posts()) {
                    $download_query->the_post();

                    //获取文件下载地址
                    $download_url = get_post_meta(get_the_ID(), 'download_url', true);

                    //获取文章缩略图
                    $get_post_thumbnail_url = wpjam_get_post_thumbnail_url();

                    //图片Alt标签
                    if(!empty($get_post_thumbnail_url)){
                        $img_alt = get_the_title();
                    }
                    ?>
                    <div class="post-download">
                        <?php
                        if(!empty($get_post_thumbnail_url)){
                            echo '<div class="download-img">';
                            echo '<img loading="lazy" src="'.$get_post_thumbnail_url.'" alt="'.$img_alt.'">';
                            echo '</div>';
                        }?>
                        <div class="download-title">
                            <h2><?php the_title();?></h2>
                            <?php the_excerpt();?>
                            <?php
                            if($module_setting['contact_style'] == 'style_3'){
                                echo '<div class="download-button">';
                                echo '<a href="'.$download_url.'" target="_blank" rel="nofollow">';
                                echo '<i class="ri-download-cloud-line"></i> '.__( '点击下载', 'modular_theme' );
                                echo '</a>';
                                echo '</div>';
                            }
                            ?>
                        </div>
                        <?php
                        if(!empty($download_url)){
                            if($module_setting['contact_style'] != 'style_3'){
                                echo '<div class="download-button">';
                                echo '<a href="'.$download_url.'" target="_blank" rel="nofollow">';
                                echo '<i class="ri-download-cloud-line"></i> '.__( '点击下载', 'modular_theme' );
                                echo '</a>';
                                echo '</div>';
                            }
                            echo '<a class="download-link" href="'.$download_url.'" target="_blank" rel="nofollow"></a>';
                        }?>
                    </div>
                    <?php
                    }
                }
            }?>
        </div>

	</div>
</div>

<?php }

//echo wpjam_print_r( $module_setting );
//echo wpjam_print_r( $module_content );
//echo wpjam_print_r( $module_style );