Very basic Hello World Wordpress Plugin -
what i'm looking create basic plugin wordpress. i've followed countless tutorials , examples, haven't found close i'm looking for.
i'm trying create simple has link on admin nav bar, , shows static html on right side of page. public wouldn't see @ all.
this sounds simple task, far, has been simple. or pointing in right direction appreciated. :)
create folder named helloworld in plugins folder , add file called helloworld.php. in php file, use hook add link admin menu.
<?php /* plugin name: hello world */ add_action('admin_bar_menu', 'add_navbar_item', 100); function add_navbar_item($admin_bar){ $admin_bar->add_menu( array( 'id' => 'my-item', 'title' => 'my item', 'href' => '#', 'meta' => array( 'title' => __('my item'), ), )); }
Comments
Post a Comment