定制 wearerequired/traduttore-registry 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

wearerequired/traduttore-registry

最新稳定版本:2.1.3

Composer 安装命令:

composer require wearerequired/traduttore-registry

包简介

Allows loading translation files from a custom GlotPress site running Traduttore

README 文档

README

PHPUnit Lint codecov Latest Stable Version Latest Unstable Version

Allows loading translation files from a custom GlotPress site running Traduttore.

Installation

If you're using Composer to manage dependencies, you can use the following command to add the plugin to your site:

composer require wearerequired/traduttore-registry

After that, you can use \Required\Traduttore_Registry\add_project( $type, $slug, $api_url ) in your theme or plugin.

Parameters:

  • $type: either plugin or theme.
  • $slug: must match the theme/plugin directory slug.
  • $api_url: the URL to the Traduttore project translation API.

Note: On a multisite install it's recommended to use it in a must-use plugin.

Usage

Here's an example of how you can use that function:

\Required\Traduttore_Registry\add_project(
	'plugin',
	'example-plugin',
	'https://translate.example.com/api/translations/acme/acme-plugin/'
);

\Required\Traduttore_Registry\add_project(
	'theme',
	'example-theme',
	'https://translate.example.com/api/translations/acme/acme-theme/'
);

a required open source product - let's get in touch

统计信息

  • 总下载量: 64.01k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 15
  • 点击次数: 1
  • 依赖项目数: 7
  • 推荐数: 1

GitHub 信息

  • Stars: 15
  • Watchers: 0
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2018-06-19