Skip to content

Instantly share code, notes, and snippets.

View pratik's full-sized avatar

Pratik Sethia pratik

View GitHub Profile
<ul class="social-icons icon-circle list-unstyled list-inline">
<li><a href="https://www.youtube.com/channel/UCBhnsfNowiZKIE2uXJz7nNA"><i class="fa fa-youtube"></i></a></li>
<li><a href="https://www.facebook.com/gameofwp/"><i class="fa fa-facebook"></i></a></li>
<li><a href="https://instagram.com/gameofwp"><i class="fa fa-instagram"></i></a></li>
<li><a href="https://twitter.com/gameofwp"><i class="fa fa-twitter"></i></a></li>
<li><a href="#"><i class="fa fa-adn"></i></a> </li>
<li><a href="#"><i class="fa fa-android"></i></a> </li>
<li> <a href="#"><i class="fa fa-apple"></i></a> </li>
<li> <a href="#"><i class="fa fa-bitbucket"></i></a> </li>
<li> <a href="#"><i class="fa fa-bitbucket-square"></i></a> </li>
@pratik
pratik / function.php
Created November 16, 2016 20:46
Add back all Visual composer 5.0 default templates. In the recent version, they introduced template library and disabled the default templates. Copy this code in the functions.php file and you're good to go.
//Workaround to see Visual Composer default templates.
add_filter( 'vc_load_default_templates', 'my_custom_template_modify_array' ); // Hook in
function my_custom_template_modify_array( $data ) {
//3x faster method to search and replace than traditional php in 10000 runs. http://php.net/manual/en/function.str-replace.php#100871
$data = json_decode( str_replace( 'true', 'false', json_encode( $data ) ), true );
return $data;
}