* This file is distributed under the same license as the Auto AnimateImage package. * attosoft , 2012. */ class Animate_Image_Utils { // @param msgid key list (variable-length argument) function __() { $num_args = func_num_args(); for ($i = 0; $i < $num_args; $i++) { $text = func_get_arg($i); $ret = $this->___($text); if ($ret != $text) return $ret; } return func_get_arg(0); } /* * Retrieves translated string from both 'animateimage' and 'default' domain */ function ___( $text ) { $ret = __($text, 'animateimage'); return $ret != $text ? $ret : __($text); } // @note '$plugin' is defined since WordPress 2.8 function plugins_url( $path, $plugin = '' ) { if (!$plugin) $plugin = __FILE__; return version_compare('2.8', get_bloginfo('version')) > 0 ? plugins_url( 'auto-animateimage/' . $path ) : plugins_url( $path, $plugin ); } } # class Animate_Image_Utils ?>