Title: Set options (modules) programatically
Last modified: September 13, 2023

---

# Set options (modules) programatically

 *  Resolved [mdxclr](https://wordpress.org/support/users/mdxclr/)
 * (@mdxclr)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/set-options-modules-programatically/)
 * Hi, I want to force settings programmatically via functions.php, how can I do
   this correctly?
 * Tried to user filter pre_option_* but its doesnt make effect (checkboxes checked,
   but functionality doesnt work)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Anton Vanyukov](https://wordpress.org/support/users/vanyukov/)
 * (@vanyukov)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/set-options-modules-programatically/#post-17052215)
 * Hi [@mdxclr](https://wordpress.org/support/users/mdxclr/),
 * Could you please try adding the `cf-images-config-written` option and set it 
   to `1`?
 * Best regards,
   Anton
 *  Thread Starter [mdxclr](https://wordpress.org/support/users/mdxclr/)
 * (@mdxclr)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/set-options-modules-programatically/#post-17069327)
 * Looks like working now, but only if `cf-images-disable-async` is also `true`,
   if options are not overridden – it work correctly.
 * I’m using this plugins as mu-plugin
 *  Plugin Author [Anton Vanyukov](https://wordpress.org/support/users/vanyukov/)
 * (@vanyukov)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/set-options-modules-programatically/#post-17087222)
 * [@mdxclr](https://wordpress.org/support/users/mdxclr/) , yeah, some hosts block
   async execution. I had to add that option for compatibility. I’ll mark this as
   resolved, but if you need additional help, please feel free to re-open.
 * Best regards,
   Anton

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Set options (modules) programatically’ is closed to new replies.

 * ![](https://ps.w.org/cf-images/assets/icon-256x256.png?rev=2930278)
 * [Offload, AI & Optimize with Cloudflare Images](https://wordpress.org/plugins/cf-images/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cf-images/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cf-images/)
 * [Active Topics](https://wordpress.org/support/plugin/cf-images/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cf-images/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cf-images/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Anton Vanyukov](https://wordpress.org/support/users/vanyukov/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/set-options-modules-programatically/#post-17087222)
 * Status: resolved