Admin bar linking problem
-
I added a custom menu to my admin bar, but when I try to add dynamic links to let’s say user inbox or activity page with bp_loggedin_user_domain function page just refreshes.
Same links work when I try linking from headher.php but I need it in admin bar.this is the code I aded to my functions.php
function add_sumtips_admin_bar_link() { global $wp_admin_bar; if ( !is_super_admin() || !is_admin_bar_showing() ) return; $wp_admin_bar->add_menu( array( 'id' => 'sumtips_link', 'title' => __( 'Osobno'), 'href' => __('< ?php echo bp_loggedin_user_domain() ?>/messages/sentbox'), )); // Add sub menu link "View All Posts" $wp_admin_bar->add_menu( array( 'parent' => 'sumtips_link', 'id' => 'sumtips_all', 'title' => __( 'View All Posts'), 'href' => __('http://sumtips.com/all'), )); // Add sub menu link "Downloads" $wp_admin_bar->add_menu( array( 'parent' => 'sumtips_link', 'id' => 'sumtips_downloads', 'title' => __( 'Downloads'), 'href' => __('<?php echo bp_loggedin_user_domain() ?>activity'), 'meta' => array( 'class' => 'st_menu_download',), )); $wp_admin_bar->add_menu( array( 'parent' => 'sumtips_downloads', 'id' => 'sumtips_browsers', 'title' => __( 'Browsers'), 'href' => __('http://sumtips.com/downloads?category=3'), )); } add_action('admin_bar_menu', 'add_sumtips_admin_bar_link',25);
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
The topic ‘Admin bar linking problem’ is closed to new replies.