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