wordpress plugin - modify BuddyPress adminbar only in admin pages -


I modified the buddypress admin bar by creating the following plugin which adds a simple text link to the bar: < Previous> Function BP_AdminBar_CreatureTime () {Global $ BP; ? & Gt; & Lt; Li & gt; & Lt ;! - Insert your link URL or relative URL, and your link text below - & gt; & Lt; A href = "http://example.com" & gt; Example link text & lt; / A & gt; & Lt; / Li & gt; & Lt ;? Php} // Call Add_action function above ('BP_AdminBar_Menus', 'BP_AdminInternationalTimenMenu', 999); However, I would not want to show that the link given above is shown in the WordPress admin backend when logged in (for example, when an administrator is editing a post). I am just doing " php_self to see if there is" / wp-admin / "in it, but it was understood that it should have a more elegant WordPress / Friends hook. / P>

thanks

Using the answer is a A WordPress function that checks to see if you are viewing the admin page.

Comments