<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ゴミ箱 &#8211; WordPress Memo</title>
	<atom:link href="https://blog.riverforest-wp.info/tag/%E3%82%B4%E3%83%9F%E7%AE%B1/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.riverforest-wp.info</link>
	<description>WordPress に関する覚え書き</description>
	<lastBuildDate>Fri, 09 May 2025 12:48:52 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://blog.riverforest-wp.info/wp-content/uploads/2018/05/cropped-icon-256x256-1-32x32.png</url>
	<title>ゴミ箱 &#8211; WordPress Memo</title>
	<link>https://blog.riverforest-wp.info</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Media Library にゴミ箱ボタンを追加するプラグイン</title>
		<link>https://blog.riverforest-wp.info/media-trash-button/</link>
		
		<dc:creator><![CDATA[Katsushi Kawamori]]></dc:creator>
		<pubDate>Wed, 13 May 2020 00:57:46 +0000</pubDate>
				<category><![CDATA[Plugin]]></category>
		<category><![CDATA[ゴミ箱]]></category>
		<category><![CDATA[メディアライブラリ]]></category>
		<guid isPermaLink="false">https://blog.riverforest-wp.info/?p=2335</guid>

					<description><![CDATA[はじめに メディアライブラリで、ゴミ箱が利用できるという事を最近知りました。wp-config.php に以下の１行を追加します。既に存在する場合は true にします。 左が従来の画面、右がゴミ箱が追加された画面になり [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">はじめに</h3>



<p>メディアライブラリで、<strong>ゴミ箱</strong>が利用できるという事を最近知りました。<strong>wp-config.php</strong> に以下の１行を追加します。既に存在する場合は <strong>true</strong> にします。</p>



<pre class="prism line-numbers"><code class="language-php language-html">define( 'MEDIA_TRASH', true );</code></pre>



<p>左が従来の画面、右が<strong>ゴミ箱</strong>が追加された画面になります。</p>



<figure class="wp-block-gallery aligncenter columns-2 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex"><ul class="blocks-gallery-grid"><li class="blocks-gallery-item"><figure><img fetchpriority="high" loading="eager" decoding="async" width="1024" height="640" src="https://blog.riverforest-wp.info/wp-content/uploads/20200513/normal-media-library-1024x640.png" alt="" data-id="2339" data-full-url="https://blog.riverforest-wp.info/wp-content/uploads/20200513/normal-media-library.png" data-link="https://blog.riverforest-wp.info/normal-media-library/" class="wp-image-2339" srcset="https://blog.riverforest-wp.info/wp-content/uploads/20200513/normal-media-library-1024x640.png 1024w, https://blog.riverforest-wp.info/wp-content/uploads/20200513/normal-media-library-300x187.png 300w, https://blog.riverforest-wp.info/wp-content/uploads/20200513/normal-media-library-768x480.png 768w, https://blog.riverforest-wp.info/wp-content/uploads/20200513/normal-media-library.png 1268w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure></li><li class="blocks-gallery-item"><figure><img loading="lazy" decoding="async" width="1024" height="634" src="https://blog.riverforest-wp.info/wp-content/uploads/20200513/trash-media-library-1024x634.png" alt="" data-id="2343" data-full-url="https://blog.riverforest-wp.info/wp-content/uploads/20200513/trash-media-library.png" data-link="https://blog.riverforest-wp.info/trash-media-library/" class="wp-image-2343" srcset="https://blog.riverforest-wp.info/wp-content/uploads/20200513/trash-media-library-1024x634.png 1024w, https://blog.riverforest-wp.info/wp-content/uploads/20200513/trash-media-library-300x186.png 300w, https://blog.riverforest-wp.info/wp-content/uploads/20200513/trash-media-library-768x475.png 768w, https://blog.riverforest-wp.info/wp-content/uploads/20200513/trash-media-library.png 1268w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure></li></ul></figure>



<p><strong>ゴミ箱</strong>に移動するには、以下の画面の様にドロップダウンメニューから選択しなければならず面倒です。メディアライブラリの「<strong>新規追加</strong>」ボタンの横に「<strong>ゴミ箱</strong>」ボタンがあれば便利ではないかと思いプラグインを作成しました。</p>



<div class="wp-block-image"><figure data-wp-context="{&quot;imageId&quot;:&quot;69e6bfa37aa8c&quot;}" data-wp-interactive="core/image" data-wp-key="69e6bfa37aa8c" class="aligncenter size-large wp-lightbox-container"><img loading="lazy" decoding="async" width="1024" height="652" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://blog.riverforest-wp.info/wp-content/uploads/20200513/trash-media-drop-1024x652.png" alt="" class="wp-image-2342" srcset="https://blog.riverforest-wp.info/wp-content/uploads/20200513/trash-media-drop-1024x652.png 1024w, https://blog.riverforest-wp.info/wp-content/uploads/20200513/trash-media-drop-300x191.png 300w, https://blog.riverforest-wp.info/wp-content/uploads/20200513/trash-media-drop-768x489.png 768w, https://blog.riverforest-wp.info/wp-content/uploads/20200513/trash-media-drop.png 1268w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="拡大する"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure></div>



<div class="pluginstatsview-normal-wrap">
	<div>
				<img decoding="async" src="https://ps.w.org/media-trash-button/assets/icon-256x256.png?rev=2303815" alt="Media Trash Button のアイコン" class="pluginstatsview-normal-icon" />
		<div class="pluginstatsview-after-icon">
			<div class="pluginstatsview-bold"><a href="https://wordpress.org/plugins/media-trash-button/" class="pluginstatsview-astyle">Media Trash Button</a></div>
			<div><a href="https://wordpress.org/plugins/media-trash-button/#reviews" title="5.0(5点満点中)" class="pluginstatsview-astyle">	<span class="pluginstatsview-stars">
					<span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span>
			</span>
	</a>(3)</div>
			<div>バージョン1.04</div>
		</div>
	</div>
	<div style="clear: both;"></div>

	<div>400以上サイトで有効化中</div>
	<div>メディアライブラリにゴミ箱ボタンを追加します。</div>
	<details open class="pluginstatsview-details">
	<summary class="pluginstatsview-summary">仕様</summary>
			<table class="pluginstatsview-table">
			<tr class="pluginstatsview-tr1">
				<th class="pluginstatsview-th">日付</th>
				<th class="pluginstatsview-th">対応バージョン</th>
				<th class="pluginstatsview-th">リンク</th>
			</tr>
			<tr class="pluginstatsview-tr2">
				<td class="pluginstatsview-td">
					<div><span class="pluginstatsview-bold">作者: </span><a href="https://profiles.wordpress.org/katsushi-kawamori/">Katsushi Kawamori</a></div>
					<div><span class="pluginstatsview-bold">最終更新: </span>3週間 前</div>
					<div><span class="pluginstatsview-bold">リリース: </span>2020-05-13</div>
				</td>
				<td class="pluginstatsview-td">
					<div><span class="pluginstatsview-bold">PHP: </span>8.0</div>
					<div><span class="pluginstatsview-bold">WordPress: </span>4.7</div>
					<div><span class="pluginstatsview-bold">検証済み: </span>7.0</div>
				</td>
				<td class="pluginstatsview-td">
					<div><span class="pluginstatsview-bold">WordPress : </span><a href="https://wordpress.org/plugins/media-trash-button/" class="dashicons dashicons-wordpress pluginstatsview-download"></a></div>
					<div><span class="pluginstatsview-bold">ダウンロード: </span><a href="https://downloads.wordpress.org/plugin/media-trash-button.1.04.zip" class="dashicons dashicons-download pluginstatsview-download"></a></div>
					<div><span class="pluginstatsview-bold">寄付: </span><a href="https://shop.riverforest-wp.info/donate/" class="dashicons dashicons-external pluginstatsview-download"></a></div>
				</td>
			</tr>
		</table>
		</details>

			<details class="pluginstatsview-details">
		<summary class="pluginstatsview-summary">備考</summary>
		<div class="pluginstatsview-normal-desc"><p>メディアライブラリにゴミ箱ボタンを追加します。</p>
<h4>ボタンを追加</h4>
<ul>
<li>リスト表示のみ。</li>
</ul>
<h4>ボタン</h4>
<ul>
<li>すべてのメディア</li>
<li>ゴミ箱を表示</li>
</ul>
<h4>wp-config.php で、次の１行を追加します。</h4>
<pre><code class="language-php language-html">define( 'MEDIA_TRASH', true );
</code></pre>
</div>
	</details>
	<div>2026-04-21 08:56 時点の統計</div>
</div>



<h3 class="wp-block-heading">動作</h3>



<p>以下の様に、「<strong>新規追加</strong>」ボタンの横に、「<strong>ゴミ箱</strong>」ボタンと「<strong>すべてのメディア</strong>」ボタンを追加します。動作はリスト表示のみとなります。</p>



<figure class="wp-block-gallery aligncenter columns-2 is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex"><ul class="blocks-gallery-grid"><li class="blocks-gallery-item"><figure><img loading="lazy" decoding="async" width="1024" height="665" src="https://blog.riverforest-wp.info/wp-content/uploads/20200513/trash_button-1024x665.png" alt="" data-id="2353" data-full-url="https://blog.riverforest-wp.info/wp-content/uploads/20200513/trash_button.png" data-link="https://blog.riverforest-wp.info/trash_button/" class="wp-image-2353" srcset="https://blog.riverforest-wp.info/wp-content/uploads/20200513/trash_button-1024x665.png 1024w, https://blog.riverforest-wp.info/wp-content/uploads/20200513/trash_button-300x195.png 300w, https://blog.riverforest-wp.info/wp-content/uploads/20200513/trash_button-768x498.png 768w, https://blog.riverforest-wp.info/wp-content/uploads/20200513/trash_button.png 1248w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure></li><li class="blocks-gallery-item"><figure><img loading="lazy" decoding="async" width="1024" height="652" src="https://blog.riverforest-wp.info/wp-content/uploads/20200513/trash-1024x652.png" alt="" data-id="2352" data-full-url="https://blog.riverforest-wp.info/wp-content/uploads/20200513/trash.png" data-link="https://blog.riverforest-wp.info/trash/" class="wp-image-2352" srcset="https://blog.riverforest-wp.info/wp-content/uploads/20200513/trash-1024x652.png 1024w, https://blog.riverforest-wp.info/wp-content/uploads/20200513/trash-300x191.png 300w, https://blog.riverforest-wp.info/wp-content/uploads/20200513/trash-768x489.png 768w, https://blog.riverforest-wp.info/wp-content/uploads/20200513/trash.png 1268w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure></li></ul></figure>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
