Advertisement
valuser

Adnin-Bar-Menu-Items

Feb 3rd, 2015
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.16 KB | None | 0 0
  1. function kcustom_adminbar_menu() {
  2.  
  3. global $wp_admin_bar;
  4.  
  5. /*if ( !is_user_logged_in() ) { return; }*/
  6.  
  7. $wp_admin_bar->add_menu( array(
  8.  
  9. 'id' => 'kcustom_menu',
  10.  
  11. 'title' => __('<img src="http://www.trulysuperb.com/wp-content/globalimages/our28.png" style="vertical-align:middle;margin-right:12px;margin-top:-3px;margin-left:-10px;" alt="Our Place" title="Our Place" />Our Place') ) /* set the menu name */
  12.  
  13. );
  14.  
  15. /* menu link */
  16.  
  17. $wp_admin_bar->add_menu( array(
  18.  
  19. 'parent' => 'kcustom_menu',
  20.  
  21. 'id' => 'Our Place', /* unique id name */
  22.  
  23. 'title' => 'Our Place', /* Set the link title */
  24.  
  25. 'href' => network_site_url(), /* Set the link a href */
  26.  
  27. )
  28.  
  29. );
  30.  
  31.  
  32. /* menu link */
  33.  
  34. $wp_admin_bar->add_menu( array(
  35.  
  36. 'parent' => 'kcustom_menu',
  37.  
  38. 'id' => 'Our Values', /* unique id name */
  39.  
  40. 'title' => 'Our Values', /* Set the link title */
  41.  
  42. 'href' => network_site_url().'/our-values', /* Set the link a href */
  43.  
  44. )
  45.  
  46. );
  47.  
  48. /* menu link */
  49.  
  50. $wp_admin_bar->add_menu( array(
  51.  
  52. 'parent' => 'kcustom_menu',
  53.  
  54. 'id' => 'Our Past', /* unique id name */
  55.  
  56. 'title' => 'Our Past', /* Set the link title */
  57.  
  58. 'href' => network_site_url().'/our-past', /* Set the link a href */
  59.  
  60. )
  61.  
  62. );
  63.  
  64. /* menu link */
  65.  
  66. $wp_admin_bar->add_menu( array(
  67.  
  68. 'parent' => 'kcustom_menu',
  69.  
  70. 'id' => 'Our Future', /* unique id name */
  71.  
  72. 'title' => 'Our Future', /* Set the link title */
  73.  
  74. 'href' => network_site_url().'/our-future', /* Set the link a href */
  75.  
  76. )
  77.  
  78. );
  79.  
  80. /* menu link */
  81.  
  82. $wp_admin_bar->add_menu( array(
  83.  
  84. 'parent' => 'kcustom_menu',
  85.  
  86. 'id' => 'Our News', /* unique id name */
  87.  
  88. 'title' => 'Our News', /* Set the link title */
  89.  
  90. 'href' => network_site_url().'/our-news', /* Set the link a href */
  91.  
  92. )
  93.  
  94. );
  95.  
  96. }
  97.  
  98. add_action( 'admin_bar_menu', 'kcustom_adminbar_menu', 15 );
  99.  
  100.  
  101. function ccustom_adminbar_menu() {
  102.  
  103. global $wp_admin_bar;
  104.  
  105. /*if ( !is_user_logged_in() ) { return; }*/
  106.  
  107. $wp_admin_bar->add_menu( array(
  108.  
  109. 'id' => 'ccustom_menu',
  110.  
  111. 'title' => __('<img src="http://www.trulysuperb.com/wp-content/globalimages/community4.png" style="vertical-align:middle;margin-right:5px;margin-top:-3px;" alt="Our Community" title="Our Community" />Our Community') ) /* set the menu name */
  112.  
  113. );
  114.  
  115. /* menu link */
  116.  
  117. $wp_admin_bar->add_menu( array(
  118.  
  119. 'parent' => 'ccustom_menu',
  120.  
  121. 'id' => 'Our Groups', /* unique id name */
  122.  
  123. 'title' => 'Our Groups', /* Set the link title */
  124.  
  125. 'href' => network_site_url().'/groups', /* Set the link a href */
  126.  
  127. )
  128.  
  129. );
  130.  
  131.  
  132. /* menu link */
  133.  
  134. $wp_admin_bar->add_menu( array(
  135.  
  136. 'parent' => 'ccustom_menu',
  137.  
  138. 'id' => 'Our Forums', /* unique id name */
  139.  
  140. 'title' => 'Our Forums', /* Set the link title */
  141.  
  142. 'href' => network_site_url().'/forums/forum/group-forums/', /* Set the link a href */
  143.  
  144. )
  145.  
  146. );
  147.  
  148. /* menu link */
  149.  
  150. $wp_admin_bar->add_menu( array(
  151.  
  152. 'parent' => 'ccustom_menu',
  153.  
  154. 'id' => 'Our Members', /* unique id name */
  155.  
  156. 'title' => 'Our Members', /* Set the link title */
  157.  
  158. 'href' => network_site_url().'/members', /* Set the link a href */
  159.  
  160. )
  161.  
  162. );
  163.  
  164. /* menu link */
  165.  
  166. $wp_admin_bar->add_menu( array(
  167.  
  168. 'parent' => 'ccustom_menu',
  169.  
  170. 'id' => 'Our Blogs', /* unique id name */
  171.  
  172. 'title' => 'Our Blogs', /* Set the link title */
  173.  
  174. 'href' => network_site_url().'/blogs', /* Set the link a href */
  175.  
  176. )
  177.  
  178. );
  179.  
  180. /* menu link */
  181.  
  182. $wp_admin_bar->add_menu( array(
  183.  
  184. 'parent' => 'ccustom_menu',
  185.  
  186. 'id' => 'Our Activity', /* unique id name */
  187.  
  188. 'title' => 'Our Activity', /* Set the link title */
  189.  
  190. 'href' => network_site_url().'/activity', /* Set the link a href */
  191.  
  192. )
  193.  
  194. );
  195.  
  196.  
  197. }
  198.  
  199. add_action( 'admin_bar_menu', 'ccustom_adminbar_menu', 20 );
  200.  
  201. function dcustom_adminbar_menu() {
  202.  
  203. global $wp_admin_bar;
  204.  
  205. /*if ( !is_user_logged_in() ) { return; }*/
  206.  
  207. $wp_admin_bar->add_menu( array(
  208.  
  209. 'id' => 'dcustom_menu',
  210.  
  211. 'title' => __('<img src="http://www.trulysuperb.com/wp-content/globalimages/resources4.png" style="vertical-align:middle;margin-right:5px;margin-top:-3px;" alt="Our Resources" title="Our Resources" />Our Resources') ) /* set the menu name */
  212.  
  213. );
  214.  
  215. /* menu link */
  216.  
  217. $wp_admin_bar->add_menu( array(
  218.  
  219. 'parent' => 'dcustom_menu',
  220.  
  221. 'id' => 'Voluntary Groups', /* unique id name */
  222.  
  223. 'title' => 'Voluntary Groups', /* Set the link title */
  224.  
  225. 'href' => 'http://voluntary.mydomain.dev', /* Set the link a href */
  226.  
  227. )
  228.  
  229. );
  230.  
  231.  
  232. /* menu link */
  233.  
  234. $wp_admin_bar->add_menu( array(
  235.  
  236. 'parent' => 'dcustom_menu',
  237.  
  238. 'id' => 'Business Directory', /* unique id name */
  239.  
  240. 'title' => 'Business Directory', /* Set the link title */
  241.  
  242. 'href' => 'http://business.mydomain.dev', /* Set the link a href */
  243.  
  244. )
  245.  
  246. );
  247.  
  248. /* menu link */
  249.  
  250. $wp_admin_bar->add_menu( array(
  251.  
  252. 'parent' => 'dcustom_menu',
  253.  
  254. 'id' => 'Jobs Directory', /* unique id name */
  255.  
  256. 'title' => 'Jobs Directory', /* Set the link title */
  257.  
  258. 'href' => 'http://jobs.mydomain.dev', /* Set the link a href */
  259.  
  260. )
  261.  
  262. );
  263.  
  264. /* menu link */
  265.  
  266. $wp_admin_bar->add_menu( array(
  267.  
  268. 'parent' => 'dcustom_menu',
  269.  
  270. 'id' => 'Ads Directory', /* unique id name */
  271.  
  272. 'title' => 'Ads Directory', /* Set the link title */
  273.  
  274. 'href' => 'http://ads.mydomain.dev', /* Set the link a href */
  275.  
  276. )
  277.  
  278. );
  279.  
  280. /* menu link */
  281.  
  282. $wp_admin_bar->add_menu( array(
  283.  
  284. 'parent' => 'dcustom_menu',
  285.  
  286. 'id' => 'Q & A', /* unique id name */
  287.  
  288. 'title' => 'Q & A', /* Set the link title */
  289.  
  290. 'href' => 'http://questions.mydomain.dev/questions', /* Set the link a href */
  291.  
  292. )
  293.  
  294. );
  295.  
  296. /* menu link */
  297.  
  298. $wp_admin_bar->add_menu( array(
  299.  
  300. 'parent' => 'dcustom_menu',
  301.  
  302. 'id' => 'NewsRuby', /* unique id name */
  303.  
  304. 'title' => 'NewsRuby', /* Set the link title */
  305.  
  306. 'href' => 'http://news.mydomain.dev', /* Set the link a href */
  307.  
  308. )
  309.  
  310. );
  311.  
  312.  
  313. }
  314.  
  315. add_action( 'admin_bar_menu', 'dcustom_adminbar_menu', 30 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement