paths = wp_upload_dir(); $this->paths['fonts'] = 'borderless_ip'; $this->paths['fonturl'] = set_url_scheme($this->paths['baseurl'].'/'.$this->paths['fonts'], $scheme); $fonts = get_option('borderless_ip'); if(is_array($fonts)) { foreach($fonts as $font => $info) { if(strpos($info['style'], 'http://' ) !== false) { wp_enqueue_style('borderless-'.$font,$info['style']); } else { wp_enqueue_style('borderless-'.$font,trailingslashit($this->paths['fonturl']).$info['style']); } } } } } /** * WPBakery. */ // Check if WPBakery is installed public function wpbakeryCheck() { if ( defined( 'WPB_VC_VERSION' ) ) { require_once( BORDERLESS__WPBAKERY . "/wpbakery.php"); } else { add_action('admin_notices', array( $this, 'wpbakeryNotice' )); return; } } // Show notice if your plugin is activated but WPBakery is not public function wpbakeryNotice() { $plugin_data = get_plugin_data(__FILE__); echo '
'.sprintf(__('%s requires WPBakery Page Builder plugin to be installed and activated on your site.', 'borderless'), $plugin_data['Name']).'