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