admin管理员组文章数量:1194107
I'm trying to use this sample php code added to my funcion.php file:
function echo_shutdown(){
echo 'test';
}
add_action( 'shutdown', 'echo_shutdown', 10 );
It works, i can see "test" at the bottom of my page.
The problem is that if i save my file wordpress warn me with the message: "Something went wrong. Your change may not have been saved. Please try again. There is also a chance that you may need to manually fix and upload the file over FTP."
I tried also various alternatives to echo: var_dump, print_r, exit('test'), ecc... also to use "register_shutdown_function" in place of shutdown wordpress hook. Same result.
When i try to output something during shutdown i receive this error message during saving.
There is a way to output something during shutdown hook without receive the warning?
本文标签: Print on screen during shutdown hookerror during saving in themeeditorphp
版权声明:本文标题:Print on screen during shutdown hook - error during saving in theme-editor.php 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738499000a2090156.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论