* Deactivates this plugin, hook this function on admin_init.
*
* @since 0.1.0
* @return void
*/
publicfunctiondeactivate_me() {
// We do a check for deactivate_plugins before calling it, to protect
// any developers from accidentally calling it too early and breaking things.
if ( function_exists( 'deactivate_plugins' ) ) {
deactivate_plugins( $this->basename );
}
}
/**
* Check that all plugin requirements are met
*
* @since 0.1.0
* @return boolean True if requirements are met.
*/
publicfunctionmeets_requirements() {
// Do checks for required classes / functions
// function_exists('') & class_exists('').
// We have met all requirements.
// Add detailed messages to $this->activation_errors array
returntrue;
}
/**
* Adds a notice to the dashboard if the plugin requirements are not met
*
* @since 0.1.0
* @return void
*/
publicfunctionrequirements_not_met_notice() {
// compile default message
$default_message = sprintf(
__( 'WDS Plugin Police is missing requirements and has been <a href="%s">deactivated</a>. Please make sure all requirements are available.', 'wds-plugin-police' ),