@@ 677-708 (lines=32) @@ | ||
674 | ) ); |
|
675 | ||
676 | // Testimonials |
|
677 | if ( Jetpack::is_module_active( 'custom-content-types' ) && get_option( 'jetpack_testimonial' ) ) { |
|
678 | $testimonials_title = $this->create_menu_item_pair( |
|
679 | array( |
|
680 | 'url' => 'https://wordpress.com/types/jetpack-testimonial/' . esc_attr( $this->primary_site_slug ), |
|
681 | 'id' => 'wp-admin-bar-edit-testimonial', |
|
682 | 'label' => __( 'Testimonials', 'jetpack' ), |
|
683 | ), |
|
684 | array( |
|
685 | 'url' => 'https://wordpress.com/edit/jetpack-testimonial/' . esc_attr( $this->primary_site_slug ), |
|
686 | 'id' => 'wp-admin-bar-new-testimonial', |
|
687 | 'label' => _x( 'Add', 'Button label for adding a new item via the toolbar menu', 'jetpack' ), |
|
688 | ) |
|
689 | ); |
|
690 | ||
691 | if ( ! current_user_can( 'edit_pages' ) ) { |
|
692 | $testimonials_title = $this->create_menu_item_anchor( |
|
693 | 'ab-item ab-primary mb-icon', |
|
694 | 'https://wordpress.com/types/jetpack-testimonial/' . esc_attr( $this->primary_site_slug ), |
|
695 | __( 'Testimonials', 'jetpack' ), |
|
696 | 'wp-admin-bar-edit-testimonial' |
|
697 | ); |
|
698 | } |
|
699 | ||
700 | $wp_admin_bar->add_menu( array( |
|
701 | 'parent' => 'publish', |
|
702 | 'id' => 'new-jetpack-testimonial', |
|
703 | 'title' => $testimonials_title, |
|
704 | 'meta' => array( |
|
705 | 'class' => 'inline-action', |
|
706 | ), |
|
707 | ) ); |
|
708 | } |
|
709 | ||
710 | // Portfolio |
|
711 | if ( Jetpack::is_module_active( 'custom-content-types' ) && get_option( 'jetpack_portfolio' ) ) { |
|
@@ 711-742 (lines=32) @@ | ||
708 | } |
|
709 | ||
710 | // Portfolio |
|
711 | if ( Jetpack::is_module_active( 'custom-content-types' ) && get_option( 'jetpack_portfolio' ) ) { |
|
712 | $portfolios_title = $this->create_menu_item_pair( |
|
713 | array( |
|
714 | 'url' => 'https://wordpress.com/types/jetpack-portfolio/' . esc_attr( $this->primary_site_slug ), |
|
715 | 'id' => 'wp-admin-bar-edit-portfolio', |
|
716 | 'label' => __( 'Portfolio', 'jetpack' ), |
|
717 | ), |
|
718 | array( |
|
719 | 'url' => 'https://wordpress.com/edit/jetpack-portfolio/' . esc_attr( $this->primary_site_slug ), |
|
720 | 'id' => 'wp-admin-bar-new-portfolio', |
|
721 | 'label' => _x( 'Add', 'Button label for adding a new item via the toolbar menu', 'jetpack' ), |
|
722 | ) |
|
723 | ); |
|
724 | ||
725 | if ( ! current_user_can( 'edit_pages' ) ) { |
|
726 | $portfolios_title = $this->create_menu_item_anchor( |
|
727 | 'ab-item ab-primary mb-icon', |
|
728 | 'https://wordpress.com/types/jetpack-portfolio/' . esc_attr( $this->primary_site_slug ), |
|
729 | __( 'Portfolio', 'jetpack' ), |
|
730 | 'wp-admin-bar-edit-portfolio' |
|
731 | ); |
|
732 | } |
|
733 | ||
734 | $wp_admin_bar->add_menu( array( |
|
735 | 'parent' => 'publish', |
|
736 | 'id' => 'new-jetpack-portfolio', |
|
737 | 'title' => $portfolios_title, |
|
738 | 'meta' => array( |
|
739 | 'class' => 'inline-action', |
|
740 | ), |
|
741 | ) ); |
|
742 | } |
|
743 | ||
744 | if ( current_user_can( 'edit_theme_options' ) ) { |
|
745 | // Look and Feel group |