wpDiscuz 7 API Documentation

  1. Home
  2. Docs
  3. wpDiscuz 7 API Documentation
  4. Actions
  5. wpdiscuz_check_version
Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages

wpdiscuz_check_version

This hook can be used for doing some action when the plugin is being updated.

Changelog

since 7.0.0 version

Usage

add_action("wpdiscuz_check_version", function () {
    $pluginData = get_plugin_data(__FILE__);
    if (version_compare($pluginData["Version"], $this->version, ">")) {
        $this->custom_actions();
    }
});

Was this article helpful to you? Yes No