<?php // Load the makepot generator require 'makepot.php'; $makepot = new Redux_Makepot(); foreach ($makepot->projects as $name => $project) { $results[$name] = $makepot->generate_pot($name); }
* @author Geert De Deckere */ /** * Note: this file is locked by default since it should not be publicly accessible * on a live website. You can unlock it by temporarily removing the following line. */ //exit( 'Locked' ); set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__)); if (isset($_SERVER['SHELL'])) { $is_shell = True; } else { $is_shell = False; } // Load the makepot generator require 'makepot.php'; $makepot = new Redux_Makepot(); // Regeneration requested if (isset($_GET) and !empty($_GET['generate']) || isset($argc, $argv) && $argc == 2 && $argv[1] == "generate") { // Generate redux-framework POT file $results = array(); foreach ($makepot->projects as $name => $project) { $results[$name] = $makepot->generate_pot($name); } } // Load ReduxFramework POT-files info $pot_files = array(); foreach ($makepot->projects as $name => $project) { $pot_files[$name] = array('file' => $project['file'], 'file_exists' => file_exists($project['file']), 'is_readable' => is_readable($project['file']), 'is_writable' => is_writable($project['file']), 'filemtime' => is_readable($project['file']) ? filemtime($project['file']) : false, 'filesize' => is_readable($project['file']) ? filesize($project['file']) : false); } if ($is_shell) { printf("ReduxFramework %s POT Generator\n\n", $makepot->redux_version());