2017-03-15 141 views
3

我有一個WordPress插件,根據我的需要進行了修改。當我將它推送到站點時,當有新的更新覆蓋我的更改時它會自動更新。我想斷開它與WordPress插件目錄的連接,以便停止更新。我需要更改哪個功能?如何阻止WordPress插件更新?

<?php 

/** 
* The plugin bootstrap file 
* 
* This file is read by WordPress to generate the plugin information in the plugin 
* admin area. This file also includes all of the dependencies used by the plugin, 
* registers the activation and deactivation functions, and defines a function 
* that starts the plugin. 
* 
* @link    http://www.acekyd.com 
* @since    1.0.0 
* @package   Display_Medium_Posts 
* 
* @wordpress-plugin 
* Plugin Name:  Display Medium Posts 
* Plugin URI:  https://github.com/acekyd/display-medium-posts 
* Description:  Display Medium Posts is a wordpress plugin that allows users display posts from medium.com on any part of their website. 
* Version:   3.0 
* Author:   AceKYD 
* Author URI:  http://www.acekyd.com 
* License:   GPL-2.0+ 
* License URI:  http://www.gnu.org/licenses/gpl-2.0.txt 
* Text Domain:  display-medium-posts 
* Domain Path:  /languages 
*/ 
?> 

回答

0

如果這個插件是公開的wordpress.org託管:

更改Plugin Name: Display Medium Posts在頂部的註釋部分,以不同的東西和獨特的,例如Plugin Name: Display Medium Posts - Fahad's Edition。它不會自動更新。

爲了使更改立即生效,您需要從wp_options表中刪除_site_transient_update_plugins。見例如Can I remove transients in the wp_options table of my WordPress install?

+0

在我最後一次嘗試中,我更改了插件的名稱,但它仍然得到更新。 –

+0

@FahadUddin剛剛嘗試過,您需要清除您網站的暫存緩存 - 請參閱更新後的答案。 –