Advertisement
jegtheme

vc-integration.php

Jul 16th, 2014
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.66 KB | None | 0 0
  1. <?php
  2. /**
  3. * Force Visual Composer to initialize as "built into the theme". This will hide certain tabs under the Settings->Visual Composer page
  4. */
  5. if(function_exists('vc_set_as_theme')) {
  6.     vc_set_as_theme();
  7. }
  8.  
  9. /* visual composer integration */
  10. function jeg_vc_update(){
  11.     if (class_exists('WPBakeryVisualComposerAbstract')) {
  12.         locate_template(array('admin/vc/extend.php'), true, true);
  13.         locate_template(array('admin/vc/view.php'), true, true);
  14.         locate_template(array('admin/vc/element.php'), true, true);
  15.         vc_set_default_editor_post_types(array('page', 'portfolio'));
  16.     }
  17. }
  18.  
  19. add_action( 'init' ,  'jeg_vc_update' , 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement