|
@@ 1074-1107 (lines=34) @@
|
| 1071 |
|
} |
| 1072 |
|
|
| 1073 |
|
// Testimonials. |
| 1074 |
|
if ( Jetpack::is_module_active( 'custom-content-types' ) && get_option( 'jetpack_testimonial' ) ) { |
| 1075 |
|
$testimonials_title = $this->create_menu_item_pair( |
| 1076 |
|
array( |
| 1077 |
|
'url' => Redirect::get_url( 'calypso-list-jetpack-testimonial' ), |
| 1078 |
|
'id' => 'wp-admin-bar-edit-testimonial', |
| 1079 |
|
'label' => esc_html__( 'Testimonials', 'jetpack' ), |
| 1080 |
|
), |
| 1081 |
|
array( |
| 1082 |
|
'url' => Redirect::get_url( 'calypso-edit-jetpack-testimonial' ), |
| 1083 |
|
'id' => 'wp-admin-bar-new-testimonial', |
| 1084 |
|
'label' => esc_html_x( 'Add', 'Button label for adding a new item via the toolbar menu', 'jetpack' ), |
| 1085 |
|
) |
| 1086 |
|
); |
| 1087 |
|
|
| 1088 |
|
if ( ! current_user_can( 'edit_pages' ) ) { |
| 1089 |
|
$testimonials_title = $this->create_menu_item_anchor( |
| 1090 |
|
'ab-item ab-primary mb-icon', |
| 1091 |
|
Redirect::get_url( 'calypso-list-jetpack-testimonial' ), |
| 1092 |
|
esc_html__( 'Testimonials', 'jetpack' ), |
| 1093 |
|
'wp-admin-bar-edit-testimonial' |
| 1094 |
|
); |
| 1095 |
|
} |
| 1096 |
|
|
| 1097 |
|
$wp_admin_bar->add_menu( |
| 1098 |
|
array( |
| 1099 |
|
'parent' => 'publish', |
| 1100 |
|
'id' => 'new-jetpack-testimonial', |
| 1101 |
|
'title' => $testimonials_title, |
| 1102 |
|
'meta' => array( |
| 1103 |
|
'class' => 'inline-action', |
| 1104 |
|
), |
| 1105 |
|
) |
| 1106 |
|
); |
| 1107 |
|
} |
| 1108 |
|
|
| 1109 |
|
// Portfolio. |
| 1110 |
|
if ( Jetpack::is_module_active( 'custom-content-types' ) && get_option( 'jetpack_portfolio' ) ) { |
|
@@ 1110-1143 (lines=34) @@
|
| 1107 |
|
} |
| 1108 |
|
|
| 1109 |
|
// Portfolio. |
| 1110 |
|
if ( Jetpack::is_module_active( 'custom-content-types' ) && get_option( 'jetpack_portfolio' ) ) { |
| 1111 |
|
$portfolios_title = $this->create_menu_item_pair( |
| 1112 |
|
array( |
| 1113 |
|
'url' => Redirect::get_url( 'calypso-list-jetpack-portfolio' ), |
| 1114 |
|
'id' => 'wp-admin-bar-edit-portfolio', |
| 1115 |
|
'label' => esc_html__( 'Portfolio', 'jetpack' ), |
| 1116 |
|
), |
| 1117 |
|
array( |
| 1118 |
|
'url' => Redirect::get_url( 'calypso-edit-jetpack-portfolio' ), |
| 1119 |
|
'id' => 'wp-admin-bar-new-portfolio', |
| 1120 |
|
'label' => esc_html_x( 'Add', 'Button label for adding a new item via the toolbar menu', 'jetpack' ), |
| 1121 |
|
) |
| 1122 |
|
); |
| 1123 |
|
|
| 1124 |
|
if ( ! current_user_can( 'edit_pages' ) ) { |
| 1125 |
|
$portfolios_title = $this->create_menu_item_anchor( |
| 1126 |
|
'ab-item ab-primary mb-icon', |
| 1127 |
|
Redirect::get_url( 'calypso-list-jetpack-portfolio' ), |
| 1128 |
|
esc_html__( 'Portfolio', 'jetpack' ), |
| 1129 |
|
'wp-admin-bar-edit-portfolio' |
| 1130 |
|
); |
| 1131 |
|
} |
| 1132 |
|
|
| 1133 |
|
$wp_admin_bar->add_menu( |
| 1134 |
|
array( |
| 1135 |
|
'parent' => 'publish', |
| 1136 |
|
'id' => 'new-jetpack-portfolio', |
| 1137 |
|
'title' => $portfolios_title, |
| 1138 |
|
'meta' => array( |
| 1139 |
|
'class' => 'inline-action', |
| 1140 |
|
), |
| 1141 |
|
) |
| 1142 |
|
); |
| 1143 |
|
} |
| 1144 |
|
|
| 1145 |
|
if ( current_user_can( 'edit_theme_options' ) ) { |
| 1146 |
|
// Look and Feel group. |