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/admin/page/product-button-setting.php
<?php 
class WPJAM_Product_Button{
	public static function __callStatic($method, $args){
		$handler	= wpjam_get_handler([
			'option_name'	=> 'wpjam-theme',
			'items_field'	=> 'product_btn',
		]);

		return wpjam_call_handler($handler, $method, ...$args);
	}

	public static function get_fields($action_key='', $post_id=0){
		return  [
			'product_btn_text' 		=> [
				'title'				=> '按钮文本',
				'type'				=> 'text',
				'required'			=> true,
				'show_admin_column'	=> true,
			],
			'product_btn_icon' 		=> [
				'title'				=> '按钮图标',
				'type'				=> 'text',
				'description'		=> '图标代码获取途径:https://www.remixicon.cn,<br>粘贴图标代码,例如:&lt;i class="ri-wechat-2-line"&gt;&lt;/i&gt;',
				'show_admin_column'	=> true,
			],
			'product_btn_color'		=> [
				'title'				=> '按钮背景颜色',
				'type'				=> 'color',
			],
			'product_btn_type'		=> [
				'title'				=> '按钮类型', 
				'type'				=> 'radio',
				'options'			=> ['link'=>'跳转链接','img'=>'弹出图片','copy'=>'一键复制','form'=>'弹出表单'],
				'show_admin_column'	=> true,
			],
			'product_btn_url' 		=> [
				'title'				=> '跳转链接',
				'type'				=> 'url',
				'required'			=> true,
				'show_if'			=> ['key'=>'product_btn_type','value'=>'link'],
			],
			'product_btn_img' 		=> [
				'title'				=> '弹出图片',
				'type'				=> 'img',
				'item_type'			=> 'url',
				'size'				=> '100×100',
				'show_if'			=> ['key'=>'product_btn_type','value'=>'img'],
				'button_text'		=> '上传图片',
				'description'		=> '',
			],
			'product_btn_form_title'=> [
				'title'				=> '表单标题',
				'type'				=> 'text',
				'required'			=> true,
				'show_if'			=> ['key'=>'product_btn_type','value'=>'form'],
			],
			'product_btn_form'		=> array_merge(wpjam_get_post_id_field('form'),[
					'title'			=> '表单',
					'show_if'		=> ['key'=>'product_btn_type','value'=>'form'],
					'required'
				]
			),
			'product_btn_copy' 		=> [
				'title'				=> '复制内容',
				'type'				=> 'text',
				'required'			=> true,
				'show_if'			=> ['key'=>'product_btn_type','value'=>'copy'],
				'description'		=> '被复制的内容,例如:你的微信号',
			],
			'product_btn_copy_tip' 	=> [
				'title'				=> '提示语',
				'type'				=> 'text',
				'required'			=> true,
				'show_if'			=> ['key'=>'product_btn_type','value'=>'copy'],
				'description'		=> '复制成功提示语,例如:微信号复制成功,请打开微信添加好友',
			],
			'product_btn_open_wechat' => [
				'title'				=> '打开微信',
				'type'				=> 'checkbox',
				'show_if'			=> ['key'=>'product_btn_type','value'=>'copy'],
				'description'		=> '复制成功后跳转到微信APP',
			],
		];
	}

	public static function get_list_table(){
		return [
			'plural'	=> 'product_tabs',
			'singular'	=> 'product_tab',
			'model'		=> self::class,
			'sortable'	=> true,
		];
	}
}