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