• Resolved Zsolt Edelényi

    (@batyuvitez)


    I have a plugin, which should be active only when Fastes cache is enabled. Would you please tell me, how can I check with a global variable or hook or get_option, if your plugin is enabled?

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Emre Vona

    (@emrevona)

    You cannot because the page is saved as a html file so PHP does not work. You should do it with Ajax.

    Thread Starter Zsolt Edelényi

    (@batyuvitez)

    I would like to add a hook before saving the page. I.e I would make changes in the HTML code of the whole page.
    What I need to check if the “enabled” button is clicked or not on your plugin setup page?

    Plugin Author Emre Vona

    (@emrevona)

    This is not a solution. if you use a hook, the hook works only once. it does not work for every visitor.

    Thread Starter Zsolt Edelényi

    (@batyuvitez)

    It is not necessary to work for every visitor. I want tu use this plugin and alter HTML before you cache the page. I want to see only if the enabled button is checked or not.

    Plugin Author Emre Vona

    (@emrevona)

    what is ‘enabled’ button?

    Thread Starter Zsolt Edelényi

    (@batyuvitez)

    WP Fastesc cache options > Cache system > enable. This is a checkbox. I would like to check the status of this checkbox.

    Plugin Author Emre Vona

    (@emrevona)

    You should use the following code.

    if($GLOBALS["wp_fastest_cache_options"]->wpFastestCacheStatus == "on"){
    	//enabled
    }else{
    	//disabled
    }
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Check if enabled’ is closed to new replies.