File tree Expand file tree Collapse file tree 5 files changed +24
-26
lines changed Expand file tree Collapse file tree 5 files changed +24
-26
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ use Underpin \Abstracts \Underpin ;
4+ use Underpin \Factories \Observers \Loader ;
5+
6+ if ( ! defined ( 'ABSPATH ' ) ) {
7+ exit ;
8+ }
9+
10+ // Add this loader.
11+ Underpin::attach ( 'setup ' , new Loader ('admin_bar_menus ' , [
12+ 'instance ' => 'Underpin\Admin_Bar_Menu\Abstracts\Admin_Bar_Menu ' ,
13+ 'default ' => 'Underpin\Admin_Bar_Menu\Factories\Admin_Bar_Menu_Instance ' ,
14+ ] ) );
Original file line number Diff line number Diff line change 1010 }
1111 ],
1212 "require" : {
13- "underpin/logger-loader " : " ^2.0"
13+ "underpin/underpin " : " ^2.0"
1414 },
1515 "autoload" : {
16+ "psr-4" : {"Underpin\\ Admin_Bar_Menu\\ " : " lib/" },
1617 "files" : [
17- " underpin-admin-bar-menus .php"
18+ " bootstrap .php"
1819 ]
1920 }
2021}
Original file line number Diff line number Diff line change 77 */
88
99
10- namespace Underpin_Admin_Bar_Menu \Abstracts ;
10+ namespace Underpin \ Admin_Bar_Menu \Abstracts ;
1111
1212
13+ use Underpin \Loaders \Logger ;
1314use Underpin \Traits \Feature_Extension ;
1415use WP_Admin_Bar ;
1516use WP_User ;
16- use function Underpin \underpin ;
1717
1818if ( ! defined ( 'ABSPATH ' ) ) {
1919exit ;
@@ -128,7 +128,7 @@ public function add_admin_bar( WP_Admin_Bar $admin_bar ) {
128128$ args = $ this ->args ;
129129$ args ['id ' ] = $ this ->id ;
130130
131- underpin ()-> logger ()-> log (
131+ Logger:: log (
132132'notice ' ,
133133'child_menu_added ' ,
134134'An admin bar menu item, ' . $ this ->id . ' was added '
@@ -142,14 +142,14 @@ public function add_admin_bar( WP_Admin_Bar $admin_bar ) {
142142
143143$ admin_bar ->add_menu ( $ child );
144144
145- underpin ()-> logger ()-> log (
145+ Logger:: log (
146146'notice ' ,
147147'child_menu_added ' ,
148148'A child menu item, ' . $ id . ' was added to the ' . $ this ->name . ' admin bar menu. '
149149);
150150}
151151} else {
152- underpin ()-> logger ()-> log (
152+ Logger:: log (
153153'warning ' ,
154154'user_cannot_view_menu ' ,
155155'The specified user cannot view the ' . $ this ->name . ' menu. It will not be displayed. ' ,
Original file line number Diff line number Diff line change 77 */
88
99
10- namespace Underpin_Admin_Bar_Menu \Factories ;
10+ namespace Underpin \ Admin_Bar_Menu \Factories ;
1111
1212
1313use Underpin \Traits \Instance_Setter ;
14- use Underpin_Admin_Bar_Menu \Abstracts \Admin_Bar_Menu ;
15- use WP_Admin_Bar ;
16- use WP_User ;
17- use function Underpin \underpin ;
14+ use Underpin \Admin_Bar_Menu \Abstracts \Admin_Bar_Menu ;
1815
1916if ( ! defined ( 'ABSPATH ' ) ) {
2017exit ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments