<?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>Victor Hung%27s Diary</title>
	<atom:link href="https://taskinghouse.com/posts/tag/%e9%9a%b1%e8%97%8f/feed/" rel="self" type="application/rss+xml" />
	<link>https://taskinghouse.com</link>
	<description></description>
	<lastBuildDate>Tue, 31 Jul 2018 15:24:14 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://taskinghouse.com/wp-content/uploads/2018/05/cropped-favicon.png</url>
	<title>隱藏 &#8211; TaskingHouse</title>
	<link>https://taskinghouse.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>「教學」在 WordPress 隱藏特定外掛更新通知</title>
		<link>https://taskinghouse.com/posts/2512080-how-to-hide-specific-plugin-update-notification-in-wordpress/</link>
		
		<dc:creator><![CDATA[Victor Hung]]></dc:creator>
		<pubDate>Sun, 15 Oct 2017 03:03:08 +0000</pubDate>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[教學]]></category>
		<category><![CDATA[外掛]]></category>
		<category><![CDATA[更新]]></category>
		<category><![CDATA[通知]]></category>
		<category><![CDATA[隱藏]]></category>
		<guid isPermaLink="false">https://diary.taskinghouse.com/posts/2017-10-15-how-to-hide-specific-plugin-update-notification-in-wordpress/</guid>

					<description><![CDATA[<p>在 WordPress 平台上有許多外掛可以使用，免費的很多，但付費的又更好用一點。付費的外掛定期會更新，若是當初是購買主題時，就附贈了這些付費外掛，雖然是可以...</p>
<p>這篇文章 <a rel="nofollow" href="https://taskinghouse.com/posts/2512080-how-to-hide-specific-plugin-update-notification-in-wordpress/">「教學」在 WordPress 隱藏特定外掛更新通知</a> 最早出現於 <a rel="nofollow" href="https://taskinghouse.com">TaskingHouse</a>。</p>
]]></description>
										<content:encoded><![CDATA[<p>在 WordPress 平台上有許多外掛可以使用，免費的很多，但付費的又更好用一點。付費的外掛定期會更新，若是當初是購買主題時，就附贈了這些付費外掛，雖然是可以正常使用沒錯，但因為沒有獨立授權，所以不能更新。因此，每當登入 WordPress 控制台時，畫面上就會彈出這些外掛、主題的更新通知。</p>
<p>又或是，我們協助客戶製作的 WordPress 網站，但客戶並不具有修改、除錯的能力，若是客戶動手更新了外掛，可能就會造成一些錯誤或是資料遺失。本篇透過在 WordPress 插入簡單的程式碼，就可以隱藏 WordPress 中特定外掛的更新。</p>
<p><span id="more-1451"></span></p>
<p>下列程式碼可以插入在 functions.php 或 wp-config.php 這兩個檔案裡面，如果不知道這兩個檔案在哪裡，也許就先不要進行此修改。</p>
<p>下列程式碼需要外掛的執行檔名稱，可以在「外掛編輯器」中找到，例如本篇以 BeTheme 主題（以及很多主題都）附贈的 Visual Composer 為例，在外掛編輯器中，可以看到它的外掛名稱是 <code>WPBakery Visual Composer</code>，而執行檔名稱則是 <code>js_composer/js_composer.php</code></p>
<p>我們可以把外掛名稱寫在註解內，而程式碼內則是要正確的填入執行檔名稱：</p>
<pre><code class="language-php"><span class="hljs-comment">/* Hide plugin update notices – WPBakery Visual Composer*/</span>
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">disable_plugin_updates</span><span class="hljs-params">( $value )</span> </span>{
   <span class="hljs-keyword">unset</span>( $value-&gt;response[<span class="hljs-string">'js_composer/js_composer.php'</span>] );
   <span class="hljs-keyword">return</span> $value;
}
add_filter( <span class="hljs-string">'site_transient_update_plugins'</span>, <span class="hljs-string">'disable_plugin_updates'</span> );
</code></pre>
<p>而 BeTheme 主題另外附贈的 LayerSlider 也是一樣：</p>
<pre><code class="language-php"><span class="hljs-comment">/* Hide plugin update notices – LayerSlider WP*/</span>
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">disable_plugin_updates</span><span class="hljs-params">( $value )</span> </span>{
   <span class="hljs-keyword">unset</span>( $value-&gt;response[<span class="hljs-string">'LayerSlider/layerslider.php'</span>] );
   <span class="hljs-keyword">return</span> $value;
}
add_filter( <span class="hljs-string">'site_transient_update_plugins'</span>, <span class="hljs-string">'disable_plugin_updates'</span> );
</code></pre>
<p>以上，將寫好的程式碼插入到 functions.php 或 wp-config.php 這兩個檔案裡面，指定的外掛就不會再跳出更新通知了。</p>
<p>這篇文章 <a rel="nofollow" href="https://taskinghouse.com/posts/2512080-how-to-hide-specific-plugin-update-notification-in-wordpress/">「教學」在 WordPress 隱藏特定外掛更新通知</a> 最早出現於 <a rel="nofollow" href="https://taskinghouse.com">TaskingHouse</a>。</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
