Skip to content

Commit 5f2cc8c

Browse files
committed
(chore): refactor variable scope
1 parent 50a5d7e commit 5f2cc8c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

openpub-base.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@
4545
* and wp_loaded action hooks.
4646
*/
4747
add_action('plugins_loaded', function () {
48-
$plugin = (new OWC\OpenPub\Base\Foundation\Plugin(__DIR__));
49-
50-
add_action('after_setup_theme', function () use ($plugin) {
48+
add_action('after_setup_theme', function () {
49+
$plugin = (new OWC\OpenPub\Base\Foundation\Plugin(__DIR__));
5150
$plugin->boot();
5251
do_action('owc/openpub-base/plugin', $plugin);
5352
});

0 commit comments

Comments
 (0)