HEX
Server: nginx/1.22.0
System: Linux iZ2ze74yt1daio6akmwwd9Z 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: 7.4.30
Disabled: passthru,exec,system,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/doba123.com/wp-content/plugins/wp-seo-tdk/seo-post-meta.php
<?php

// 添加后台界面meta_box
add_action('add_meta_boxes','seo_post_metas_box_init');
function seo_post_metas_box_init(){
	add_meta_box('seo-metas','SEO','seo_post_metas_box',array('post','page'),'side','high');
}
function seo_post_metas_box($post){
	if($post->ID) {
		$post_id = $post->ID;
		$seo_title = seo_get_post_meta($post_id,'_seo_title');
		$seo_keywords = seo_get_post_meta($post_id,'_seo_keywords');
		$seo_description = seo_get_post_meta($post_id,'_seo_description');
	}
	else {
		$seo_title = '';
		$seo_keywords = '';
		$seo_description = '';
	}
	?>
	<div class="seo-metas">
		<p>SEO标题:<input type="text" class="regular-text" name="seo_title" value="<?php echo seo_quota_encode($seo_title); ?>" style="max-width: 98%;"></p>
		<p>SEO关键词:<input type="text" class="regular-text" name="seo_keywords" value="<?php echo seo_quota_encode($seo_keywords); ?>" style="max-width: 98%;"></p>
		<p>SEO描述:<br><textarea class="large-text" name="seo_description"><?php echo $seo_description; ?></textarea></p>
	</div>
<?php
}

// 保存填写的meta信息
add_action('save_post','seo_post_metas_box_save');
function seo_post_metas_box_save($post_id){
	$seo_title = strip_tags($_POST['seo_title']);
	$seo_keywords = strip_tags($_POST['seo_keywords']);
	$seo_description = seo_clear_code(strip_tags($_POST['seo_description']));
	update_post_meta($post_id,'_seo_title',$seo_title);
	update_post_meta($post_id,'_seo_keywords',$seo_keywords);
	update_post_meta($post_id,'_seo_description',$seo_description);
}