Browse Source

Fix activation hook.

pull/22/head
Ned Zimmerman 7 years ago
parent
commit
16b0a9e743
No known key found for this signature in database
GPG Key ID: FF56334A013120CA
  1. 8
      app/activation.php
  2. 13951
      package-lock.json

8
app/activation.php

@ -2,7 +2,7 @@
namespace Aldine; namespace Aldine;
add_action('after_switch_theme', function () { add_action('admin_init', function () {
$default_pages = [ $default_pages = [
'about' => [ 'about' => [
'post_title' => __('About', 'aldine'), 'post_title' => __('About', 'aldine'),
@ -36,7 +36,7 @@ If you require further assistance, please contact your network manager.', 'aldin
], ],
]; ];
if (! get_site_option('pb_aldine_activated')) { if (! get_option('pb_aldine_activated')) {
// Add our pages // Add our pages
$pages = []; $pages = [];
@ -64,7 +64,7 @@ If you require further assistance, please contact your network manager.', 'aldin
return; return;
} }
// Add "pb_aldine_activated" site option to enable check above // Add "pb_aldine_activated" option to enable check above
add_site_option('pb_aldine_activated', true); add_option('pb_aldine_activated', 1);
} }
}); });

13951
package-lock.json generated

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save