Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(!defined('ABSPATH')) die('-1');
- //class started
- class themenameVCExtendAddonClass{
- function __construct(){
- add_action('init', array($this, 'seoIntegrateWithVC'));
- }
- public function seoIntegrateWithVC(){
- if( ! defined('WPB_VC_VERSION')){
- add_action('admin_notices', array($this, 'seoShowVcVersionNotice'));
- return;
- }
- // visual composer addons
- include SEO_ACC_PATH . '/vc-addons/vc-slides.php';
- }
- public function seoShowVcVersionNotice(){
- $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.', 'mytheme'), $theme_data->get('Name')).'
- </p>
- </div>
- ';
- }
- }
- // Finally initialize code
- new themenameVCExtendAddonClass();
Advertisement
Add Comment
Please, Sign In to add comment