简体   繁体   English

如何阻止 Wordpress 尝试使用 Wordpress.org 上的主题更新我的主题

[英]How to stop Wordpress trying to update my theme with a theme on Wordpress.org

I have had a personal/custom theme named "Chameleon" for over 1 year.我有一个名为“变色龙”的个人/自定义主题已经超过 1 年了。 As of yesterday, I get a notification in Wordpress to update it to the latest version.截至昨天,我在 Wordpress 中收到一条通知,要求将其更新到最新版本。 Out of curiosity, I clicked it (knowing it was not my update).出于好奇,我点击了它(知道这不是我的更新)。

Wordpress replaced my theme with a Wordpress.org theme named "Chameleon". Wordpress 用名为“Chameleon”的 Wordpress.org 主题替换了我的主题

I have googled this issue, and it appears Wordpress has no intention of fixing this ridiculous bug.我在谷歌上搜索了这个问题,看起来 Wordpress 无意修复这个荒谬的错误。 The issue seems to have been brought up 9 years ago.这个问题似乎是在 9 年前提出的。 I do not know how this has only become apparent now.我不知道这怎么现在才变得明显。 I have been using creating Wordpress sites for clients for 9 years and never ever seen anything like this. 9 年来,我一直在为客户创建 Wordpress 网站,但从未见过这样的事情。

Does anyone know how to fix this?有谁知道如何解决这一问题?

Is there a function I can add that stop Wordpress looking for an update on Wordpress.org for just my custom themes?有没有我可以添加的功能来阻止 Wordpress 在 Wordpress.org 上为我的自定义主题寻找更新?

A fix like changing the name in the style.css and folder is not going to cut it.像更改 style.css 和文件夹中的名称这样的修复不会削减它。

Try in functions.php:在functions.php中尝试:

//Disable automatic WordPress theme updates
add_filter( 'auto_update_theme', '__return_false' );

Or All updates in your wp-config.php file:或 wp-config.php 文件中的所有更新:

define( 'AUTOMATIC_UPDATER_DISABLED', true );

Read more 阅读更多

Also you can try this plugin - Disable All WordPress Updates .你也可以试试这个插件 -禁用所有 WordPress 更新 Inside it chose option "Disable All Theme Updates".在里面选择了“禁用所有主题更新”选项。

This fixed my error in Chameleon:这修复了我在变色龙中的错误:

custom_functions.php (epanel/custom_functions.php) in line 786第 786 行中的 custom_functions.php(面板/custom_functions.php)

}

$last_update->last_checked = time();
set_site_transient( 'et_update_themes', $last_update );

return $update_transient;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM