Checkbox Problem
-
Hello,
I managed to have a working Admin Page with a checkbox (result is correcty stored in database) but I can’t figure how to execute some piece of code only if is checked… Found nothing related to checkbox in tutorials.
Tried this with no succes:
if (AdminPageFramework::getOption( 'MyPluginName', 'my_checkbox_2', '1' )) { remove_action( 'wp_head', 'feed_links', 2 ); remove_action( 'wp_head', 'feed_links_extra', 3 ); } else {}
In fact, the code is always executed. Not only when the option is checked…
Somebody has an idea?
Here is a gist with my full plugin code
https://gist.github.com/bugsysop/5b81d62ae49415df4e9c3cc657964118
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Checkbox Problem’ is closed to new replies.