【问题标题】:Where can I find a big list of WordPress plugins?我在哪里可以找到大量的 WordPress 插件列表?
【发布时间】:2015-10-08 09:18:10
【问题描述】:

我是一名对 WordPress 感兴趣的安全研究员。我一直在测试我在 wordpress 官方网站上找到的几个插件。我正在寻找大量的 wordpress 插件列表,有没有人知道有 WordPress 插件列表或数据库可供下载的网站?我只测试了官方网站。

【问题讨论】:

    标签: wordpress plugins


    【解决方案1】:

    如果您想了解更多插件详情。只需单击此https://yendif.com/ 因为该网站包含免费和付费的 Joomla 和 Wordpress 插件..它看起来像完整包

    【讨论】:

    • 您应该在答案中包含链接的内容以便更好地理解
    【解决方案2】:

    如果您正在寻找一种方法来获取 WordPress.org 插件目录中列出的所有插件的列表。

    这里有一些建议给你:这个问题已经被问了很长时间了 - 但无论如何..这是我能想出的小主意..

    不是最好的答案,但我试图以最好的方式解决我自己的问题。

    你可以这样开始:

    https://api.wordpress.org/plugins/info/1.2/?action=query_plugins&request[page]=1&request[per_page]=400

    此外:我认为这是不言自明的。

    获取插件列表 这不会返回所有插件,但会返回评分最高的插件:

    $plugins = plugins_api('query_plugins', array(
        'per_page' => 100,
        'browse' => 'top-rated',
        'fields' =>
            array(
                'short_description' => false,
                'description' => false,
                'sections' => false,
                'tested' => false,
                'requires' => false,
                'rating' => false,
                'ratings' => false,
                'downloaded' => false,
                'downloadlink' => false,
                'last_updated' => false,
                'added' => false,
                'tags' => false,
                'compatibility' => false,
                'homepage' => false,
                'versions' => false,
                'donate_link' => false,
                'reviews' => false,
                'banners' => false,
                'icons' => false,
                'active_installs' => false,
                'group' => false,
                'contributors' => false
            )));
    Save the data as JSON
    Since the data that we get is huge and it will be bad for performance, we try to get the name and the slug out of the array and then we write it in a JSON file:
    
    $plugins_json = '{' . PHP_EOL;
    // Get only the name and the slug
    foreach ($plugins as $plugin) {
        foreach ($plugin as $key => $p) {
            if ($p->name != null) {
                // Let's beautify the JSON
                $plugins_json .= '  "'. $p->name . '": {' . PHP_EOL;
                $plugins_json .= '      "slug": "' . $p->slug . '"' . PHP_EOL;
                end($plugin);
                $plugins_json .= ($key !== key($plugin)) ? '    },' . PHP_EOL : '   }' . PHP_EOL;
            }
        }
    }
    $plugins_json .= '}';
    file_put_contents('plugins.json', $plugins_json);
    

    现在我们有了一个精简的 JSON 文件,其中只有我们需要的数据。

    为了不断更新 JSON 文件,我们运行该脚本以通过设置 Cron 作业每 24 小时创建一个 JSON 文件。

    HTH

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-19
      • 1970-01-01
      • 2010-10-30
      • 2012-02-28
      • 2021-07-13
      相关资源
      最近更新 更多