Skip to content

Commit

Permalink
resolves conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
alexstandiford committed Nov 23, 2021
2 parents eddcd1c + 7c81c02 commit 1982f67
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 26 deletions.
14 changes: 14 additions & 0 deletions bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

use Underpin\Abstracts\Underpin;
use Underpin\Factories\Observers\Loader;

if ( ! defined( 'ABSPATH' ) ) {
exit;
}

// Add this loader.
Underpin::attach( 'setup', new Loader('admin_bar_menus', [
'instance' => 'Underpin\Admin_Bar_Menu\Abstracts\Admin_Bar_Menu',
'default' => 'Underpin\Admin_Bar_Menu\Factories\Admin_Bar_Menu_Instance',
] ) );
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
}
],
"require": {
"underpin/logger-loader": "^2.0"
"underpin/underpin": "^2.0"
},
"autoload": {
"psr-4": {"Underpin\\Admin_Bar_Menu\\": "lib/"},
"files": [
"underpin-admin-bar-menus.php"
"bootstrap.php"
]
}
}
10 changes: 5 additions & 5 deletions Admin_Bar_Menu.php → lib/Abstracts/Admin_Bar_Menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
*/


namespace Underpin_Admin_Bar_Menu\Abstracts;
namespace Underpin\Admin_Bar_Menu\Abstracts;


use Underpin\Loaders\Logger;
use Underpin\Traits\Feature_Extension;
use WP_Admin_Bar;
use WP_User;
use function Underpin\underpin;

if ( ! defined( 'ABSPATH' ) ) {
exit;
Expand Down Expand Up @@ -128,7 +128,7 @@ public function add_admin_bar( WP_Admin_Bar $admin_bar ) {
$args = $this->args;
$args['id'] = $this->id;

underpin()->logger()->log(
Logger::log(
'notice',
'child_menu_added',
'An admin bar menu item, ' . $this->id . ' was added'
Expand All @@ -142,14 +142,14 @@ public function add_admin_bar( WP_Admin_Bar $admin_bar ) {

$admin_bar->add_menu( $child );

underpin()->logger()->log(
Logger::log(
'notice',
'child_menu_added',
'A child menu item, ' . $id . ' was added to the ' . $this->name . ' admin bar menu.'
);
}
} else {
underpin()->logger()->log(
Logger::log(
'warning',
'user_cannot_view_menu',
'The specified user cannot view the ' . $this->name . ' menu. It will not be displayed.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@
*/


namespace Underpin_Admin_Bar_Menu\Factories;
namespace Underpin\Admin_Bar_Menu\Factories;


use Underpin\Traits\Instance_Setter;
use Underpin_Admin_Bar_Menu\Abstracts\Admin_Bar_Menu;
use WP_Admin_Bar;
use WP_User;
use function Underpin\underpin;
use Underpin\Admin_Bar_Menu\Abstracts\Admin_Bar_Menu;

if ( ! defined( 'ABSPATH' ) ) {
exit;
Expand Down
14 changes: 0 additions & 14 deletions underpin-admin-bar-menus.php

This file was deleted.

0 comments on commit 1982f67

Please sign in to comment.