我试图获得一个短代码函数(newStuff)来显示另一个函数(oldStuff)的内部,但我遇到了麻烦。下面列出了两个短代码函数,以及我尝试过的功能。有人能帮我在“oldStuff”函数中显示“newStuff”函数吗?
谢谢
Current Functions
function newStuff(){
return \'
only raw html is in this function
\';
}
add_shortcode(\'new\', \'newStuff\');
function oldStuff(){
return \'
only raw html is in this function
\';
}
add_shortcode(\'old\', \'oldStuff\');
I tried including the short code, but it didn\'t work
function oldStuff(){
return \'
[new]
only raw html is in this function
\';
}
add_shortcode(\'old\', \'oldStuff\');
I tried including the function, but it didn\'t work
function oldStuff(){
return \'
echo newStuff();
only raw html is in this function
\';
}
add_shortcode(\'old\', \'oldStuff\');