Closed tangrufus closed 7 years ago
I used it here only because I've seen it used by many other developers, so I chose to follow their lead. I didn't tear things apart to find out "why" but assumed there must be SOME reason that other devs choose to suppress errors from that function :)
Checking the source code of submit_button
and get_submit_button
, I don't think we are expecting any errors here.
Suppressing unexpected errors is not a good idea.
Besides, WordPress v4.8.1 itself don't use @submit_button
nor @get_submit_button
.
After doing more homework, I confirmed the same... seems like @submit_button() is a legacy copy/paste issue that just sort of exists out there for no real reason. Removed: https://github.com/dmchale/disable-json-api/commit/e9501431844c79042ea62dbd947f45b29b056bcd
Any reason to use
@
?https://github.com/dmchale/disable-json-api/blob/f907172e83021f622b3007ef363bc5fa6c610cdc/admin.php#L76