• 0
Sign in to follow this  
Followers 0

How to add a button "Save less" to WP admin bar


Question

Posted · Report post

Hello I need to add an admin bar button to save less

Share this post


Link to post
Share on other sites

3 answers to this question

  • 0

Posted · Report post

Hi,

 

I am not sure what you;re referring to, but if you want to add a menu item to the Wordpress Adminbar you will need to ask this question on the Wordpress support forums, as it is related to Wordpress not PageLines.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi,

 

I am not sure what you;re referring to, but if you want to add a menu item to the Wordpress Adminbar you will need to ask this question on the Wordpress support forums, as it is related to Wordpress not PageLines.

 

Ok

 

I have no problem with a function that adds an item to the menu in the "WP admin bar", but I need to know what do I add an item to the menu.
 
Here is an example
 

 

<?php

function mytheme_admin_bar_render() {

global $wp_admin_bar; // we can remove a menu item, like the Comments link, just by knowing the right $id

$wp_admin_bar->remove_menu('comments'); // or we can remove a submenu, like New Link.

$wp_admin_bar->remove_menu('new-link', 'new-content'); // we can add a submenu item too

$wp_admin_bar->add_menu( array( 'parent' => 'new-content', 'id' => 'new_media', 'title' => __('Media'), 'href' => admin_url( 'media-new.php') ) ); } // and we hook our function via

add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' );

?>

 

As I discovered so "Save LESS" in Admin "PageLines> Dashboard> DMS Tools' link to the ajax.

Which link to insert into the menu?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Donnie,

 

That needs to be in a specific hook, but I'm not sure how or which.  You're going to have to modify a WordPress file, since you're working on the WP Admin bar. That's basically out of our control. Check Wordpress.org to see if you can find a solution there.  One may exist in their codex.

 

http://wordpress.org/support/topic/customize-the-admin-bar

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0