|
@@ 770-801 (lines=32) @@
|
| 767 |
|
} |
| 768 |
|
|
| 769 |
|
// Testimonials |
| 770 |
|
if ( Jetpack::is_module_active( 'custom-content-types' ) && get_option( 'jetpack_testimonial' ) ) { |
| 771 |
|
$testimonials_title = $this->create_menu_item_pair( |
| 772 |
|
array( |
| 773 |
|
'url' => 'https://wordpress.com/types/jetpack-testimonial/' . esc_attr( $this->primary_site_slug ), |
| 774 |
|
'id' => 'wp-admin-bar-edit-testimonial', |
| 775 |
|
'label' => esc_html__( 'Testimonials', 'jetpack' ), |
| 776 |
|
), |
| 777 |
|
array( |
| 778 |
|
'url' => 'https://wordpress.com/edit/jetpack-testimonial/' . esc_attr( $this->primary_site_slug ), |
| 779 |
|
'id' => 'wp-admin-bar-new-testimonial', |
| 780 |
|
'label' => esc_html_x( 'Add', 'Button label for adding a new item via the toolbar menu', 'jetpack' ), |
| 781 |
|
) |
| 782 |
|
); |
| 783 |
|
|
| 784 |
|
if ( ! current_user_can( 'edit_pages' ) ) { |
| 785 |
|
$testimonials_title = $this->create_menu_item_anchor( |
| 786 |
|
'ab-item ab-primary mb-icon', |
| 787 |
|
'https://wordpress.com/types/jetpack-testimonial/' . esc_attr( $this->primary_site_slug ), |
| 788 |
|
esc_html__( 'Testimonials', 'jetpack' ), |
| 789 |
|
'wp-admin-bar-edit-testimonial' |
| 790 |
|
); |
| 791 |
|
} |
| 792 |
|
|
| 793 |
|
$wp_admin_bar->add_menu( array( |
| 794 |
|
'parent' => 'publish', |
| 795 |
|
'id' => 'new-jetpack-testimonial', |
| 796 |
|
'title' => $testimonials_title, |
| 797 |
|
'meta' => array( |
| 798 |
|
'class' => 'inline-action', |
| 799 |
|
), |
| 800 |
|
) ); |
| 801 |
|
} |
| 802 |
|
|
| 803 |
|
// Portfolio |
| 804 |
|
if ( Jetpack::is_module_active( 'custom-content-types' ) && get_option( 'jetpack_portfolio' ) ) { |
|
@@ 804-835 (lines=32) @@
|
| 801 |
|
} |
| 802 |
|
|
| 803 |
|
// Portfolio |
| 804 |
|
if ( Jetpack::is_module_active( 'custom-content-types' ) && get_option( 'jetpack_portfolio' ) ) { |
| 805 |
|
$portfolios_title = $this->create_menu_item_pair( |
| 806 |
|
array( |
| 807 |
|
'url' => 'https://wordpress.com/types/jetpack-portfolio/' . esc_attr( $this->primary_site_slug ), |
| 808 |
|
'id' => 'wp-admin-bar-edit-portfolio', |
| 809 |
|
'label' => esc_html__( 'Portfolio', 'jetpack' ), |
| 810 |
|
), |
| 811 |
|
array( |
| 812 |
|
'url' => 'https://wordpress.com/edit/jetpack-portfolio/' . esc_attr( $this->primary_site_slug ), |
| 813 |
|
'id' => 'wp-admin-bar-new-portfolio', |
| 814 |
|
'label' => esc_html_x( 'Add', 'Button label for adding a new item via the toolbar menu', 'jetpack' ), |
| 815 |
|
) |
| 816 |
|
); |
| 817 |
|
|
| 818 |
|
if ( ! current_user_can( 'edit_pages' ) ) { |
| 819 |
|
$portfolios_title = $this->create_menu_item_anchor( |
| 820 |
|
'ab-item ab-primary mb-icon', |
| 821 |
|
'https://wordpress.com/types/jetpack-portfolio/' . esc_attr( $this->primary_site_slug ), |
| 822 |
|
esc_html__( 'Portfolio', 'jetpack' ), |
| 823 |
|
'wp-admin-bar-edit-portfolio' |
| 824 |
|
); |
| 825 |
|
} |
| 826 |
|
|
| 827 |
|
$wp_admin_bar->add_menu( array( |
| 828 |
|
'parent' => 'publish', |
| 829 |
|
'id' => 'new-jetpack-portfolio', |
| 830 |
|
'title' => $portfolios_title, |
| 831 |
|
'meta' => array( |
| 832 |
|
'class' => 'inline-action', |
| 833 |
|
), |
| 834 |
|
) ); |
| 835 |
|
} |
| 836 |
|
|
| 837 |
|
if ( current_user_can( 'edit_theme_options' ) ) { |
| 838 |
|
// Look and Feel group |