diff --git a/faf-compare.php b/faf-compare.php index 310b060..4077acf 100644 --- a/faf-compare.php +++ b/faf-compare.php @@ -1 +1 @@ -'.fafCompareTrans('FAF Compare').''; } add_action('media_buttons', 'fafCompareAddEditorButton', 101); /** * add short code * * @param $atts * @return string */ function fafCompareShort( $atts ) { if (isset($atts['before']) && isset($atts['after'])) { $orientation = (isset($atts['orientation'])) ? $atts['orientation'] : 'horizontal'; $size = (isset($atts['size'])) ? $atts['size'] : 'thumbnail'; $before = $atts['before']; $after = $atts['after']; $html = '
'; $html .= wp_get_attachment_image($before, $size); $html .= wp_get_attachment_image($after, $size); $html .= '
'; return $html; } } add_shortcode('compare', 'fafCompareShort'); /** * custom translation */ function fafCompareTrans($string) { $locale = get_locale(); $lang = (!empty($locale)) ? $locale : WPLANG; $transFile = dirname(__FILE__).'/lang/'.$lang.'.php'; if (is_file($transFile)) { $translation = include($transFile); if (array_key_exists($string, $translation)) { return $translation[$string]; } } return $string; } \ No newline at end of file +'.__('FAF Image Compare', 'faf-compare').''; } add_action('media_buttons', 'fafCompareAddEditorButton', 101); /** * add short code * * @param $atts * @return string */ function fafCompareShort( $atts ) { if (isset($atts['before']) && isset($atts['after'])) { $orientation = (isset($atts['orientation'])) ? $atts['orientation'] : 'horizontal'; $size = (isset($atts['size'])) ? $atts['size'] : 'thumbnail'; $before = $atts['before']; $after = $atts['after']; $html = '
'; $html .= wp_get_attachment_image($before, $size); $html .= wp_get_attachment_image($after, $size); $html .= '
'; return $html; } } add_shortcode('compare', 'fafCompareShort'); \ No newline at end of file diff --git a/lang/de_DE.php b/lang/de_DE.php deleted file mode 100644 index a3b6aba..0000000 --- a/lang/de_DE.php +++ /dev/null @@ -1 +0,0 @@ - 'FAF Vergleich' ); \ No newline at end of file diff --git a/lang/en_US.php b/lang/en_US.php deleted file mode 100644 index 0d46d3b..0000000 --- a/lang/en_US.php +++ /dev/null @@ -1 +0,0 @@ -