From cd9d9d02d636a5fd52f032ee70d29ea9aad26c50 Mon Sep 17 00:00:00 2001 From: Cameron Jones Date: Tue, 19 Apr 2016 10:08:30 +1000 Subject: [PATCH] Localising SDK --- facebook-page-feed-graph-api.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/facebook-page-feed-graph-api.php b/facebook-page-feed-graph-api.php index f7b72d5..f0ff543 100644 --- a/facebook-page-feed-graph-api.php +++ b/facebook-page-feed-graph-api.php @@ -120,6 +120,10 @@ function facebook_page_plugin( $filter ) { ), $filter ); if(isset($a['href']) && !empty($a['href'])){ $a['language'] = str_replace("-", "_", $a['language']); + + //Send the language as a parameter to the SDK + wp_localize_script( 'facebook-page-plugin-sdk', 'facebook_page_plugin_language', array( 'language' => $a['language'] ) ); + $return .= '
'; $return .= '
'; $return .= '