承接 k1sul1/polylang-get-all-translations 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

k1sul1/polylang-get-all-translations

Composer 安装命令:

composer require k1sul1/polylang-get-all-translations

包简介

New function to Polylang that prints all translations as key-value pairs.

README 文档

README

Get all translations for the current language as a single key-value object. Calls are cached for performance. You can use the object in wp_localize_script() to print all string translations to the client as a JavaScript object.

pl_get_all_translations() gives you a cached array of keypairs.

There's a few filters that you can use to configure the plugin.

Requirements

  • Polylang
  • PHP 5.4+

Installation

Install the plugin via Composer

composer require k1sul1/polylang-get-all-translations

Activate the plugin

wp plugin activate polylang-get-all-translations

Usage

wp_enqueue_script('theme-js', get_stylesheet_directory_uri() . '/dist/js/bundle.js', false, $version, true);
wp_localize_script('theme-js', 'pll', pl_get_all_translations());

统计信息

  • 总下载量: 71
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2016-12-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固