Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(!defined('ABSPATH')){
- exit;
- }
- //Class Startd
- class unifyVCExtendaddonClass{
- function __construct(){
- // We safely integrate with vc with this hook
- add_action('init', array($this, 'unifyIntegratewithVC'));
- }
- public function unifyIntegratewithVC(){
- //Check if visual composer is not installed
- if(!defined('WPB_VC_VERSION')){
- add_action('admin_notices', array($this, 'unifyShowVcVersionNotice'));
- return;
- }
- //Visual Composer addons.
- include UNIFY_ACC_PATH.'/vc-addons/vc-slides.php';
- }
- //Show visual composer version
- public function unifyShowVcVersionNotice(){
- $theme_data = wp_get_theme();
- echo '
- <div class="notice notice-warning">
- <p>'.sprintf(__('<strong>%s</strong> recommends <strong><a href="'.site_url().'/wp-admin/themes.php?page=tgmpa-install-plugins" target="_blank">Visual Composer </a></strong> plugin to be installed and activated on your site.', 'seo-textdomain'), $theme_data->get('Name')).'</p>
- </div>';
- }
- }
- new unifyVCExtendaddonClass();
- ?>
Add Comment
Please, Sign In to add comment