Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy the fix for "WP_Admin_Bar::add_node was called incorrectly" into 0.5-dev #1504

Merged
merged 1 commit into from
Jul 31, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions inc/dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,53 +120,53 @@ function largo_custom_login_logo() {
* Largo Dashboard / Admin Bar Menu
* -- Priority 15 Places between WordPress Logo and My Sites
* -- To move menu to end of items use something like priority 999
*/
*/

add_action( 'admin_bar_menu', 'largo_dash_admin_menu', 15 );
function largo_dash_admin_menu( $wp_admin_bar ) {

// Add Top Level Text Node for Dropdown
$args = array( 'id' => 'largo_admin_mega', 'title' => 'Largo' );
$args = array( 'id' => 'largo_admin_mega', 'title' => 'Largo' );
$wp_admin_bar->add_node( $args );

// Main Website
$args = array( 'id' => 'website', 'title' => 'Main Website', 'href' => 'http://largoproject.org/', 'parent' => 'largo_admin_mega' );
$args = array( 'id' => 'website', 'title' => 'Main Website', 'href' => 'http://largoproject.org/', 'parent' => 'largo_admin_mega' );
$wp_admin_bar->add_node( $args );

// Documentation
$args = array( 'id' => 'largo_docs', 'title' => 'Documentation', 'href' => 'http://largo.readthedocs.io/', 'parent' => 'largo_admin_mega' );
$args = array( 'id' => 'largo_docs', 'title' => 'Documentation', 'href' => 'http://largo.readthedocs.io/', 'parent' => 'largo_admin_mega' );
$wp_admin_bar->add_node( $args );

// Knowledge Base
$args = array( 'id' => 'knowledge_base', 'title' => 'Knowledge Base', 'href' => 'http://support.largoproject.org/support/solutions', 'parent' => 'largo_admin_mega' );
$args = array( 'id' => 'knowledge_base', 'title' => 'Knowledge Base', 'href' => 'http://support.largoproject.org/support/solutions', 'parent' => 'largo_admin_mega' );
$wp_admin_bar->add_node( $args );

// Member Help Desk
$args = array( 'id' => 'support', 'title' => 'Help Desk', 'href' => 'http://support.largoproject.org', 'parent' => 'largo_admin_mega' );
$args = array( 'id' => 'support', 'title' => 'Help Desk', 'href' => 'http://support.largoproject.org', 'parent' => 'largo_admin_mega' );
$wp_admin_bar->add_node( $args );

// Member Forums
$args = array( 'id' => 'user_forums', 'title' => 'Community Forums', 'href' => 'http://support.largoproject.org/support/discussions', 'parent' => 'largo_admin_mega' );
$args = array( 'id' => 'user_forums', 'title' => 'Community Forums', 'href' => 'http://support.largoproject.org/support/discussions', 'parent' => 'largo_admin_mega' );
$wp_admin_bar->add_node( $args );

// Largo on GitHub
$args = array( 'id' => 'github', 'title' => 'Largo on GitHub', 'href' => 'https:/inn/largo', 'parent' => 'largo_admin_mega' );
$args = array( 'id' => 'github', 'title' => 'Largo on GitHub', 'href' => 'https:/inn/largo', 'parent' => 'largo_admin_mega' );
$wp_admin_bar->add_node( $args );

// Largo on Twitter
$args = array( 'id' => 'twitter', 'title' => '@LargoProject on Twitter', 'href' => 'https://twitter.com/largoproject', 'parent' => 'largo_admin_mega');
$args = array( 'id' => 'twitter', 'title' => '@LargoProject on Twitter', 'href' => 'https://twitter.com/largoproject', 'parent' => 'largo_admin_mega');
$wp_admin_bar->add_node( $args );

// INN Nerds
$args = array(' id' => 'inn_nerds', 'title' => 'INN Nerds', 'href' => 'http://nerds.inn.org', 'parent' => 'largo_admin_mega' );
$args = array( 'id' => 'inn_nerds', 'title' => 'INN Nerds', 'href' => 'http://nerds.inn.org', 'parent' => 'largo_admin_mega' );
$wp_admin_bar->add_node( $args );
// About INN
$args = array( 'id' => 'about_inn', 'title' => 'About INN', 'href' => 'http://inn.org', 'parent' => 'largo_admin_mega' );

// About INN
$args = array( 'id' => 'about_inn', 'title' => 'About INN', 'href' => 'http://inn.org', 'parent' => 'largo_admin_mega' );
$wp_admin_bar->add_node( $args );

// Donate
$args = array( 'id' => 'donate_inn', 'title' => 'Donate', 'href' => 'https://inn.org/donate', 'parent' => 'largo_admin_mega' );
$args = array( 'id' => 'donate_inn', 'title' => 'Donate', 'href' => 'https://inn.org/donate', 'parent' => 'largo_admin_mega' );
$wp_admin_bar->add_node( $args );

}
Expand Down