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