diff --git wp-includes/admin-bar.php wp-includes/admin-bar.php
index 77ab5848ee..3c3a116535 100644
|
|
function wp_admin_bar_new_content_menu( $wp_admin_bar ) { |
849 | 849 | $actions['post-new.php?post_type=content'][1] = 'add-new-content'; |
850 | 850 | } |
851 | 851 | |
| 852 | if ( current_user_can( 'create_sites' ) && is_multisite() ) { |
| 853 | $actions['wp-login.php?action=register'] = array( _x( 'Site', 'add new from admin bar' ), 'new-site' ); |
| 854 | } |
| 855 | |
852 | 856 | if ( current_user_can( 'create_users' ) || ( is_multisite() && current_user_can( 'promote_users' ) ) ) { |
853 | 857 | $actions['user-new.php'] = array( _x( 'User', 'add new from admin bar' ), 'new-user' ); |
854 | 858 | } |
… |
… |
function wp_admin_bar_new_content_menu( $wp_admin_bar ) { |
870 | 874 | foreach ( $actions as $link => $action ) { |
871 | 875 | list( $title, $id ) = $action; |
872 | 876 | |
| 877 | if ( 'new-site' === $id ) { |
| 878 | $href = wp_registration_url(); |
| 879 | } else { |
| 880 | $href = admin_url( $link ); |
| 881 | } |
| 882 | |
873 | 883 | $wp_admin_bar->add_node( |
874 | 884 | array( |
875 | 885 | 'parent' => 'new-content', |
876 | 886 | 'id' => $id, |
877 | 887 | 'title' => $title, |
878 | | 'href' => admin_url( $link ), |
| 888 | 'href' => $href, |
879 | 889 | ) |
880 | 890 | ); |
881 | 891 | } |