PHP code example of k1sul1 / polylang-get-all-translations
1. Go to this page and download the library: Download k1sul1/polylang-get-all-translations library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
k1sul1 / polylang-get-all-translations example snippets
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());