Skip to content

Commit

Permalink
Update code comments and add changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
lushkant committed Jun 16, 2020
1 parent 45f18f3 commit 848e0b0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Higgs Assistant Changelog

## 1.0.0 - June 16, 2020
* Initial release
17 changes: 10 additions & 7 deletions higgs-assistant.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,28 @@
* @package Higgs
*/


// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}

if ( ! class_exists( 'Higgs_Assistant' ) ) :
/**
* Higgs Assistant Class
*
* @since 1.0
*/
class Higgs_Assistant {

/**
* Instance var.
*
* @since 1.0
*/
private static $instance;

/**
* Register instance for plugin class.
*
* @since 1.0
*/
Expand All @@ -45,6 +47,7 @@ public static function register() {
}

/**
* Defined constants.
*
* @since 1.0
*/
Expand All @@ -56,6 +59,7 @@ public function define_constants() {
}

/**
* Defines a constant.
*
* @param string $name
* @param string $value
Expand All @@ -68,6 +72,7 @@ private function define( $name, $value ) {
}

/**
* Includes plugin files.
*
* @since 1.0
*/
Expand All @@ -85,6 +90,7 @@ public function includes() {


/**
* Plugin class instance.
*
* @since 1.0
*/
Expand All @@ -93,6 +99,7 @@ function higgs_assistant() {
}

/**
* Plugin activation alert.
*
* @since 1.0
*/
Expand All @@ -103,18 +110,14 @@ function higgs_assistant_activation_notice() {
}

/**
*
* Plugin activation check.
*
* @since 1.0
*/
function higgs_assistant_activation_check() {
$theme = wp_get_theme(); // gets the current theme.
if ( 'Higgs' === $theme->name || 'Higgs' === $theme->parent_theme ) {
if ( function_exists( 'is_multisite' ) && is_multisite() ) {
add_action( 'after_setup_theme', 'higgs_assistant' );
} else {
higgs_assistant();
}
add_action( 'after_setup_theme', 'higgs_assistant' );
} else {
if ( ! function_exists( 'deactivate_plugins' ) ) {
require_once ABSPATH . 'wp-admin/includes/plugin.php';
Expand Down

0 comments on commit 848e0b0

Please sign in to comment.