我运行此代码是为了告诉我哪些插件需要更新:
$update_plugins = get_site_transient(\'update_plugins\');
下面是一个返回示例:
Array
(
[login-lockdown/loginlockdown.php] => stdClass Object
(
[id] => 3760
[slug] => login-lockdown
[new_version] => v1.5
[url] => http://wordpress.org/extend/plugins/login-lockdown/
[package] => http://downloads.wordpress.org/plugin/login-lockdown.1.5.zip
)
)
因此,它不会告诉我需要更新的插件的名称。是否有WordPress函数可以提供插件文件名,如:
ogin-lockdown/loginlockdown.php
并返回插件名称?在这种情况下,我想
Login LockDown
待退回。