Skip to content

Commit

Permalink
Activate Hook Update / Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
royboy789 committed Jul 21, 2018
1 parent e728bd2 commit 594354b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions GutesObjectPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @wordpress-plugin
* Plugin Name: Gutenberg Object Plugin
* Description: Saves Gutenberg data as array into DB & adds API to access it
* Version: 1.3.0
* Version: 1.4.0
* Author: Roy Sivan
* Author URI: https://roysivan.com
* License: GPL-3.0+
Expand Down Expand Up @@ -56,4 +56,5 @@ public function run() {
$database = new Database();

$gutenbergObjectPlugin = new GutesObjectPlugin( $database, $api, $hooks );
$gutenbergObjectPlugin->run();
$gutenbergObjectPlugin->run();
$database->create();
8 changes: 5 additions & 3 deletions src/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

namespace GutesObjectPlugin;

use GutesObjectPlugin\GutesObjectPlugin;


class Database {

public function __construct() {
register_activation_hook( GutesArrayPluginFile, [ $this, 'activate_gutes_array_save' ] );
register_deactivation_hook( GutesArrayPluginFile, [ $this, 'deactivate_gutes_array_save' ] );
public function create() {
register_activation_hook( GutesObjectPlugin::$GutesObjectPluginFile, [ $this, 'activate_gutes_array_save' ] );
register_deactivation_hook( GutesObjectPlugin::$GutesObjectPluginFile, [ $this, 'deactivate_gutes_array_save' ] );
}

public function activate_gutes_array_save() {
Expand Down

0 comments on commit 594354b

Please sign in to comment.