classes/Tools/Storage/StorageTool.php
private function hookMediaList() {
		if(!$this->mediaListIntegration) {
			return;
		}

		add_action('admin_init', function() {
			add_filter('manage_media_columns', function($cols) {
				$cols["cloud"] = 'Cloud';

				return $cols;
			});

			add_action('manage_media_custom_column', function($column_name, $id) {
				if($column_name == "cloud") {
					$meta = wp_get_attachment_metadata($id);
					if(!empty($meta) && isset($meta['s3'])) {
						echo "<a href='".$meta['s3']['url']."' target=_blank>View</a>";
					}
				}
			}, 10, 2);
		});

		add_action('wp_enqueue_media', function() {
			add_action('admin_head', function() {
				if(get_current_screen()->base == 'upload') {
					?>
                    <style>
                        th.column-s3, td.column-s3 {
                            width: 60px !important;
                            max-width: 60px !important;
                        }
                    </style>
					<?php
				}
			});
		});
	}
private function hookMediaList() {
		if(!$this->mediaListIntegration) {
			return;
		}

		add_action('admin_init', function() {
			add_filter('manage_media_columns', function($cols) {
				$cols["cloud"] = 'Cloud';

				return $cols;
			});

			add_action('manage_media_custom_column', function($column_name, $id) {
				if($column_name == "cloud") {
					$meta = wp_get_attachment_metadata($id);
					if(!empty($meta) && isset($meta['s3'])) {
						echo "<a href='".$meta['s3']['url']."' target=_blank>View</a>";
					}
				}
			}, 10, 2);
		});

		add_action('wp_enqueue_media', function() {
			add_action('admin_head', function() {
				if(get_current_screen()->base == 'upload') {
					?>
                    <style>
                        th.column-s3, td.column-s3 {
                            width: 60px !important;
                            max-width: 60px !important;
                        }
                    </style>
					<?php
				}
			});
		});
	}
private function hookMediaList ( ) { if ( ! $ this -> mediaListIntegration ) { return ; } add_action ( 'admin_init' , function ( ) { add_filter ( 'manage_media_columns' , function ( $ cols ) { $ cols [ "cloud" ] = 'Cloud' ; return $ cols ; } ) ; add_action ( 'manage_media_custom_column' , function ( $ column_name , $ id ) { if ( $ column_name == "cloud" ) { $ meta = wp_get_attachment_metadata ( $ id ) ; if ( ! empty ( $ meta ) && isset ( $ meta [ 's3' ] ) ) { echo "<a href='" . $ meta [ 's3' ] [ 'url' ] . "' target=_blank>View</a>" ; } } } , 10 , 2 ) ; } ) ; add_action ( 'wp_enqueue_media' , function ( ) { add_action ( 'admin_head' , function ( ) { if ( get_current_screen ( ) -> base == 'upload' ) { ?>
                    <style>
                        th.column-s3, td.column-s3 {
                            width: 60px !important;
                            max-width: 60px !important;
                        }
                    </style>
					<?php } } ) ; } ) ; }
Adds a custom column to the media list.
Adds a custom column to the media list .