Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/260.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 在wordpress自定义\u寄存器上使用多个函数?_Php_Wordpress_Function_Wordpress Theming - Fatal编程技术网

Php 在wordpress自定义\u寄存器上使用多个函数?

Php 在wordpress自定义\u寄存器上使用多个函数?,php,wordpress,function,wordpress-theming,Php,Wordpress,Function,Wordpress Theming,为了更好地组织我的主题的functions.php,我想知道是否可以在customize_register上使用add_操作添加多个函数?例如: function banana_customize($wp_customize) { ///// Content of function } add_action('customize_register','banana_customize') function coconut_customize($wp_customize) { ///// Con

为了更好地组织我的主题的functions.php,我想知道是否可以在customize_register上使用add_操作添加多个函数?例如:

function banana_customize($wp_customize) {
///// Content of function }
add_action('customize_register','banana_customize')

function coconut_customize($wp_customize) {
///// Content of function }
add_action('customize_register','coconut_customize')
如果我这样做,我有一个错误,页面将无法加载

如果这是不可能的,您能告诉我如何组合如下功能:

function banana_customize($wp_customize) {
///// Content of function }

function coconut_customize($wp_customize) {
///// Content of function }

" function combined_functions = banana_customize + coconut_customize "

add_action('customize_register','combined_functions')
提前感谢:)