Early versions of XenWord automatically created a thread. Some customers asked for the allow comments to be used as a conditional for creating the thread. If unchecked then XenWord would not create the thread.
This created confusion for some people who simply wanted an option available to check. After two weeks of headaches, I found my error and the option now works as expected.
Here is a short video on how the option looks in XenWord 3.3.3.
The problem was a simple conditional to check if the option existed.
I wasn't aware that if a checkbox is unchecked then nothing is sent. This meant the value was not set, the code executed a return, and the update_post_meta never happened. Removing these lines fixed the issue.
This created confusion for some people who simply wanted an option available to check. After two weeks of headaches, I found my error and the option now works as expected.
Here is a short video on how the option looks in XenWord 3.3.3.
The problem was a simple conditional to check if the option existed.
PHP:
// Make sure that it is set.
if ( ! isset( $_POST['xenword_checkbox'] ) ) {
return;
}
I wasn't aware that if a checkbox is unchecked then nothing is sent. This meant the value was not set, the code executed a return, and the update_post_meta never happened. Removing these lines fixed the issue.