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/extends/wpjam-fix/wpjam-fix.php
<?php
add_filter('option_wpjam-extends', function($value){
	$value	= is_array($value) ? $value : [];

	return array_merge($value, [
		'related-posts'		=> 0,
		'mobile-theme'		=> 0,
		'wpjam-postviews'	=> 1
	]);
});

add_filter('option_wpjam-basic', function ($value){
	$value	= is_array($value) ? $value : [];

	$value['excerpt_optimization']	= $value['excerpt_optimization'] ?? 1;
	$value['excerpt_length']		= $value['excerpt_length'] ?? 115;

	return $value;
});

add_filter('option_wpjam-custom', function ($value){
	$value	= is_array($value) ? $value :[];
	$options = get_option('theme_info_options', []);
	$value['admin_footer']	= 'Powered by <a href="'.esc_url($options['author_uri'] ?? 'https://www.xintheme.com/theme/188027.html').'" target="_blank">'.esc_html($options['author'] ?? 'XinTheme 新主题 + WordPress果酱').'</a>';

	return $value;
});

add_filter('option_wpjam-thumbnail', function($value){
	$value	= is_array($value) ? $value : [];

	return array_merge($value, [
		'auto'					=> true,
		'post_thumbnail_orders'	=> [['type'=>'post_meta','post_meta'=>'header_img'],['type'=>'first'],]
	]);
});

if(is_admin()){
	add_filter('pre_transient_wpjam_basic_verify', '__return_true');
	add_filter('wpjam_option_setting_sections', function($sections, $name){
		if($name == 'wpjam-extends'){
			foreach(['related-posts', 'mobile-theme', 'wpjam-postviews'] as $extend){
				$sections['wpjam-extends']['fields'][$extend]['class']	= 'disabled';
			}
		}elseif($name == 'wpjam-custom'){
			$sections['admin']['fields']['admin_footer']['class']	= 'disabled';
		}elseif($name == 'wpjam-thumbnail'){
			$fields	= &$sections['wpjam-thumbnail']['fields'];

			$fields['auto']['class']	= 'disabled';

			unset($fields['term_set']);
			unset($fields['post_set']);
		}

		return $sections;
	}, 99, 2);
}

add_action('init', function(){
	foreach(['form_mail'=>'form_mail', 'thank_url'=>'form_redirect'] as $theme_key => $form_key){
		if(wpjam_get_setting('wpjam-comment', $form_key) === null){
			wpjam_update_setting('wpjam-comment', $form_key, (wpjam_theme_get_setting($theme_key) ?: ''));
		}
	}
});