Skip to content

Commit

Permalink
fixed - class namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveJonesDev committed Mar 7, 2024
1 parent fe938b6 commit 85547a2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion enable-contributor-uploads.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,17 @@
die;
}

// Plugin Root File.
if ( ! defined( 'EDECU_PLUGIN_FILE' ) ) {
define( 'EDECU_PLUGIN_FILE', __FILE__ );
}

// Autoloads classes from the 'inc' directory.
if ( file_exists( plugin_dir_path( __FILE__ ) . 'vendor/autoload.php' ) ) {
include_once plugin_dir_path( __FILE__ ) . 'vendor/autoload.php';
}

// Initialize the plugin.
if ( class_exists( 'EDAC\Inc\Plugin' ) ) {
if ( class_exists( 'EDECU\Inc\Plugin' ) ) {
( new Plugin() )->init();
}
4 changes: 2 additions & 2 deletions inc/class-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public function __construct() {
* Registers activation and deactivation hooks, and adds action to load text domain.
*/
public function init() {
register_activation_hook( __FILE__, array( $this, 'activate' ) );
register_deactivation_hook( __FILE__, array( $this, 'deactivate' ) );
register_activation_hook( EDECU_PLUGIN_FILE, array( $this, 'activate' ) );
register_deactivation_hook( EDECU_PLUGIN_FILE, array( $this, 'deactivate' ) );
}

/**
Expand Down

0 comments on commit 85547a2

Please sign in to comment.