[wordpress插件] WP ComposerWP作曲家

wordpress 插件 文章 2020-03-30 00:00 490 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

Adding Composer dependency management to WP CLI.

将Composer依赖性管理添加到WP CLI。

Allows you to recursivly install/update composer packages inside of all of your WordPress plugins and themes.

允许您在所有WordPress插件和主题内递归安装/更新composer软件包。

What is this using?

这是做什么用的?

This package uses a great piece of software called WP-CLI.

此软件包使用了一个名为 WP-CLI 的出色软件。

It provides a command line interface for WordPress management.

它提供了用于WordPress管理的命令行界面。

We are a plugin providing Composer management inside of WP CLI.

我们是一个可在WP CLI内部提供Composer管理的插件。

What’s Composer?

什么是作曲家?

It’s the greatest thing to happen to the web since GIFs, Drop Shadows and dancing cats.

自GIF,投影和跳舞猫以来,这是网络上发生的最糟糕的事情。

Composer is a dead simple JSON-based dependency manager for PHP.

Composer是PHP的简单的基于JSON的依赖管理器。

For more information, check out http://getcomposer.org/.

有关更多信息,请查看 http://getcomposer.org/

So this is complete Composer support?

这是对Composer的完整支持吗?

No, not exactly!

不,不完全是!

Sadly, I’m building this out and I’m trying to make some sweet WP-CLI and Composer integration.

可悲的是,我正在扩展它,并尝试进行一些不错的WP-CLI和Composer集成。

But for now, we only support a few command:

但目前,我们仅支持一些命令:

    • install
    • 安装

    • update
    • 更新

    • diagnose
    • 诊断

    • help
    • 帮助

    • status
    • 状态

    If you’d love to help out, please help!

    如果您想提供帮助,请提供帮助!

    Make a pull request and let’s get coding!

    发出拉取请求,让我们开始编码!

    How do I build Composer Management inside of my plugin?

    如何在插件内部构建Composer Management?

    Simple really!

    真的很简单!

    You just create a simple composer.json file like you would with any Composer project.

    您只需像创建任何Composer项目一样创建一个简单的 composer.json 文件。

    From there, wp-composer will interface with each plugin/theme that has composer support and it will generate the autoload files, too!

    从那里,wp-composer将与支持作曲家的每个插件/主题进行交互,并且还将生成自动加载文件!

    Just include something like this inside your main plugin file:

    只需在主插件文件中包含以下内容:

    require(__DIR__.'/vendor/autoload.php');

      require(__ DIR __。'/ vendor / autoload.php');

    It’s that simple.

    就这么简单。

安装步骤

    1. Upload /composer/ to the /wp-content/plugins/ directory
    2. / composer / 上载到 / wp-content / plugins / 目录

    3. Activate the plugin through the ‘Plugins’ menu in WordPress
    4. 通过WordPress中的“插件”菜单激活插件

    5. Interface with it via wp-cli!
    6. 通过wp-cli与它接口!

下载地址
https://downloads.wordpress.org/plugin/composer.0.1.2.zip
-EOF-

AI助手支持GPT4.0