Changeset 12867
- Timestamp:
- 08/29/2023 07:42:59 PM (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/photo-directory/inc/admin.php
r12783 r12867 30 30 add_filter( "manage_{$post_type}_posts_columns", [ __CLASS__, 'add_flags_column' ] ); 31 31 add_action( "manage_{$post_type}_posts_custom_column", [ __CLASS__, 'handle_flags_column_data' ], 10, 2 ); 32 add_filter( "manage_edit-{$post_type}_columns", [ __CLASS__, 'remove_ photo_colors_column' ] );32 add_filter( "manage_edit-{$post_type}_columns", [ __CLASS__, 'remove_columns_from_pending_photos' ] ); 33 33 add_filter( 'post_row_actions', [ __CLASS__, 'add_post_action_photo_links' ], 10, 2 ); 34 34 add_filter( 'the_author', [ __CLASS__, 'add_published_photos_count_to_author' ] ); … … 370 370 371 371 /** 372 * Removes the colors column from the listing of pending photos. 373 * 374 * Currently colors aren't auto-assigned, so rarely is there antyhing 375 * to show. 372 * Removes certain columns from the listing of pending photos. 373 * 374 * Removes these columns: 375 * - The colors column. (Currently colors aren't auto-assigned, so rarely 376 * is there antyhing to show.) 377 * - The number of likes, as provided by Jetpack. 376 378 * 377 379 * @param array $columns Array of post column titles. 378 380 * @return array 379 381 */ 380 public static function remove_ photo_colors_column( $columns ) {382 public static function remove_columns_from_pending_photos( $columns ) { 381 383 if ( 382 384 filter_input( INPUT_GET, 'post_type' ) === Registrations::get_post_type() … … 385 387 ) { 386 388 unset( $columns[ 'taxonomy-' . Registrations::get_taxonomy( 'colors' ) ] ); 389 unset( $columns['likes'] ); 387 390 } 388 391
Note: See TracChangeset
for help on using the changeset viewer.