Facebook Social Plugins JavaScript SDK Data Validation

I have made the following SDK code dynamic using Redux Framework.

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.9&appId=228435337504344";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

And I have used the following code to retrieve the code in my template file:

$b_facebook_sdk = $portbox_redux_option['b_facebook_sdk'];  
<?php echo  $b_facebook_sdk; ?>

Now my queries are:

  1. Is it required to make this dynamic code data validated for themeforest submission?

  2. If yes, then how to do that? I have used this code:

    <?php echo wp_kses( $b_facebook_sdk, array( 'div'=>array( 'id'=>array() ) )); ?>
    

But not working 🙁 .
What can I do?
Please, extened your helping hand 🙂
Thanks in advance.

Read more here: Facebook Social Plugins JavaScript SDK Data Validation

Leave a Reply

Your email address will not be published. Required fields are marked *