• Resolved Chad Reitsma

    (@chadreitsma)


    Hey guys,
    I tried searching the support forums for an answer but came up short.

    Is there a helper function which allows us to read the W3TC config values from /w3tc-config/master.php? I need to retrieve the “cdn.cf2.cname” value.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @chadreitsma

    Thank you for reaching out and I am happy to assist you with this.
    The master.php is a configuration file, and it’s modified depending on your settings in the W3TC dashboard.
    Of course, if manually edited with proper actions, the changes can be reflected in the W3TC dashboard also.
    So to answer your question, there is no function for this in W3TC.

    I hope this helps!

    Thanks!

    Thread Starter Chad Reitsma

    (@chadreitsma)

    Hi Marko,
    Thank-you for your reply, but I need some more help. ??

    How do I read values from master.php?

    It seems like we are having some sort of conflict because when a CDN is active it’s changing the GUID’s of images in the wp_post table. However some are not changing, and I’m not sure why.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @chadreitsma

    Thank you for your feedback.
    When CDN is enabled in W3 Total Cache, it uses the URL rewrite to serve the assets from the CDN. This should not have any effect on the GUIDs of the images.
    The master.php is a file you can read using any text editor.

    Thanks!

    Thread Starter Chad Reitsma

    (@chadreitsma)

    Thank-you Marko, I know I can open the file with a text editor ?? I was originally asking if there was a helper class in W3TC so I could read those values from PHP.

    Something like: $w3tc->get_config(‘cf2.cname’); or similar?

    Thank-you for the info on the GUID columns, I think we have a plugin conflict so I can dig a little deeper!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @chadreitsma

    Thank you for your feedback.
    As I’ve mentioned before, there is no possibility of doing this for now.
    I’ll chat with the team and see if something can be implemented in the future.
    Thank you again!

    Thread Starter Chad Reitsma

    (@chadreitsma)

    Ah, sorry I missed that part in your original reply. Thank-you for confirming!

    Thread Starter Chad Reitsma

    (@chadreitsma)

    Hey Marko,

    One more quick question — I noticed in master.php you have <?php exit; ?> right before the start of the JSON config string. Can this be removed?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to read option values?’ is closed to new replies.