Changeset 12769
- Timestamp:
- 08/01/2023 10:04:38 PM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/photo-directory/inc/admin.php
r12707 r12769 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 33 add_filter( 'post_row_actions', [ __CLASS__, 'add_post_action_photo_links' ], 10, 2 ); 33 34 add_filter( 'the_author', [ __CLASS__, 'add_published_photos_count_to_author' ] ); … … 325 326 326 327 do_action( 'wporg_photos_flag_column_data', $post ); 328 } 329 330 /** 331 * Removes the colors column from the listing of pending photos. 332 * 333 * Currently colors aren't auto-assigned, so rarely is there antyhing 334 * to show. 335 * 336 * @param array $columns Array of post column titles. 337 * @return array 338 */ 339 public static function remove_photo_colors_column( $columns ) { 340 if ( 341 filter_input( INPUT_GET, 'post_type' ) === Registrations::get_post_type() 342 && 343 filter_input( INPUT_GET, 'post_status' ) === 'pending' 344 ) { 345 unset( $columns[ 'taxonomy-' . Registrations::get_taxonomy( 'colors' ) ] ); 346 } 347 348 return $columns; 327 349 } 328 350
Note: See TracChangeset
for help on using the changeset viewer.