Changeset 12269
- Timestamp:
- 11/23/2022 04:16:19 AM (4 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-trac-watcher/admin
- Files:
-
- 2 edited
-
list-table.php (modified) (3 diffs)
-
post.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-trac-watcher/admin/list-table.php
r11371 r12269 342 342 343 343 case 'props': 344 $output = '<div class="propslist">'; 344 $can_edit = current_user_can( 'publish_posts' ); 345 $output = '<div class="propslist">'; 345 346 346 347 foreach ( $item->props as $prop => $user_id ) { … … 373 374 $output .= '</a>'; 374 375 } 375 $output .= '<div class="overlay"><div class="actions"><a href="#" class="edit dashicons dashicons-edit"></a></div></div>'; 376 if ( $can_edit ) { 377 $output .= '<div class="overlay"><div class="actions"><a href="#" class="edit dashicons dashicons-edit"></a></div></div>'; 378 } 376 379 377 380 if ( $prop_is_different_from_user || $prop_display_name_different ) { … … 385 388 $output .= '</span>'; 386 389 } 387 $output .= '<span class="user add"><a href="#" class="add dashicons dashicons-plus"></a> <a href="#" class="add">Add new</a></span>'; 390 391 if ( $can_edit ) { 392 $output .= '<span class="user add"><a href="#" class="add dashicons dashicons-plus"></a> <a href="#" class="add">Add new</a></span>'; 393 } 394 388 395 $output .= '</div>'; 389 396 390 $output .= '<p class="actions"><a href="#" class="reparse">Reparse</a></p>'; 397 if ( $can_edit ) { 398 $output .= '<p class="actions"><a href="#" class="reparse">Reparse</a></p>'; 399 } 391 400 392 401 return $output; -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-trac-watcher/admin/post.php
r11370 r12269 5 5 global $wpdb; 6 6 7 if ( ! current_user_can( ' edit_posts' ) ) {7 if ( ! current_user_can( 'publish_posts' ) ) { 8 8 die( '-1' ); 9 9 } … … 133 133 global $wpdb; 134 134 135 if ( ! current_user_can( ' edit_posts' ) ) {135 if ( ! current_user_can( 'publish_posts' ) ) { 136 136 die( '-1' ); 137 137 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)