Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Add activation/deactivation functions #138
This adds a simple call to the rewrite initiation function and flushes rewrites on plugin activation and a second function to run on deactivation.
On deactivation, there is no
Technically, it's all the same, but I see it as:
It would set us up for splitting out the class to a separate file, while keeping these "meta" functions in the base plugin file. While we're aiming at PHP 5.5+ for best performance, we don't enforce that. Splitting out real functionality from the base plugin file would make it easier to use modern syntax without worrying about a hard fatal on upgrading sites that lack the proper PHP. We can use the activation function to check and not allow activation or only
tl;dr: It sets us up for less code churn in the future.