WordPress では、すべてのプラグインが更新されているのに、プラグインの更新が 1 つあると表示されます。以下は、私が何を言っているのかわかるスクリーンショットです。
さて、私はWPを再インストールしたり、一時的なものを削除したりと、いくつかのことを試しました。Artiss トランジェントクリーナー、しかし、何も機能していないようです。この不正/ゴースト「プラグイン」が、更新がないのに更新を要求する原因について何か考えはありますか?
ベストアンサー1
アクティベーション キーが必要なプレミアム プラグインやテーマでは、このような現象が時々発生します。WP UI ではプラグインやテーマを更新する方法が提供されませんが、UI に保留中の更新数が表示されます。
ソースを追跡するには、次の関数を使用します。
/**
* Debug Pending Updates
*
* Crude debugging method that will spit out all pending plugin
* and theme updates for admin level users when ?debug_updates is
* added to a /wp-admin/ URL.
*/
function debug_pending_updates() {
// Rough safety nets
if ( ! is_user_logged_in() || ! current_user_can( 'manage_options' ) ) return;
if ( ! isset( $_GET['debug_updates'] ) ) return;
$output = "";
// Check plugins
$plugin_updates = get_site_transient( 'update_plugins' );
if ( $plugin_updates && ! empty( $plugin_updates->response ) ) {
foreach ( $plugin_updates->response as $plugin => $details ) {
$output .= "<p><strong>Plugin</strong> <u>$plugin</u> is reporting an available update.</p>";
}
}
// Check themes
wp_update_themes();
$theme_updates = get_site_transient( 'update_themes' );
if ( $theme_updates && ! empty( $theme_updates->response ) ) {
foreach ( $theme_updates->response as $theme => $details ) {
$output .= "<p><strong>Theme</strong> <u>$theme</u> is reporting an available update.</p>";
}
}
if ( empty( $output ) ) $output = "No pending updates found in the database.";
wp_die( $output );
}
add_action( 'init', 'debug_pending_updates' );
これをテーマのfunctions.php
ファイルに追加し、URL に が追加されたページにアクセスします?debug_updates
。例: yourdomain.example/wp-admin/?debug_updates
。これにより、問題の原因となっているテーマまたはプラグインが表示されます。