WP Manifestindependent plugin directory
manifest / i18n / polylang-get-all-translations

Polylang - Get all translations WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA

Get all translations for the current language as a single key-value object.

★ 3stars
71composer installs
0.1.4latest · 9 years ago

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/k1sul1/polylang-get-all-translations/archive/refs/heads/master.zip

On Packagist as k1sul1/polylang-get-all-translations:

composer require k1sul1/polylang-get-all-translations
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

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());

Releases

4 releases.

Tag
Published
0.1.4 latest
Aug 28, 2017 9 years ago
Feb 10, 2017 9 years ago
Feb 5, 2017 9 years ago
Dec 30, 2016 9 years ago

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.

A grade

Security

Polylang - Get all translations 0.1.3 · audited by WP Registry

No security issues found.

Audited release
0.1.3
Findings
none
Worst severity
—
Content hash
298cf02053a0bbd2b8ceb6d5…

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.