Source of file class-installer.php

Size: 1,013 Bytes - Last Modified: 2016-01-05T15:40:14-05:00

../src/lib/class-installer.php

12345678910111213141516171819202122232425262728293031
Covered by 1 test(s):
  • WpWodify\InstallerTest::test_install
32
Covered by 1 test(s):
  • WpWodify\InstallerTest::test_install
33343536373839
Covered by 1 test(s):
  • WpWodify\InstallerTest::test_uninstall
40
Covered by 1 test(s):
  • WpWodify\InstallerTest::test_uninstall
41424344
Covered by 1 test(s):
  • WpWodify\InstallerTest::test_uninstall
45
Covered by 1 test(s):
  • WpWodify\InstallerTest::test_uninstall
46
<?php
/**
 * Installer Class
 *
 * @category    PHP
 * @package     WpWodify
 * @subpackage  Installer
 * @since       File available since release 1.0.x
 * @author      Cory Collier <corycollier@corycollier.com>
 */

namespace WpWodify;

/**
 * Installer Class
 *
 * @category    PHP
 * @package     WpWodify
 * @subpackage  Installer
 * @since       Class available since release 1.0.x
 * @author      Cory Collier <corycollier@corycollier.com>
 */
class Installer {

    /**
     * Installs the plugin
     * @return [type] [description]
     */
    public function install() {
        // really not needed here, but this is always a good housekeeping measure
        flush_rewrite_rules();
    }

    /**
     * Uninstalls the plugin
     * @return [type] [description]
     */
    public function uninstall() {
        if (! defined('WP_UNINSTALL_PLUGIN')) {
          return;
        }

        // really not needed here, but this is always a good housekeeping measure
        flush_rewrite_rules();
    }
}