/** * Class Constructor. Defines the args for the extions class * * @since 1.0.0 * @access public * * @param array $sections Panel sections. * @param array $args Class constructor arguments. * @param array $extra_tabs Extra panel tabs. * * @return void */ public function __construct($parent = null) { if (empty($this->extension_dir)) { $this->extension_dir = trailingslashit(str_replace('\\', '/', dirname(__FILE__))); $this->extension_url = trailingslashit(get_template_directory_uri()) . 'includes/avadaredux/extensions/vendorsupport/vendor_support/'; // $this->extension_url = site_url( str_replace( trailingslashit( str_replace( '\\', '/', ABSPATH ) ), '', $this->extension_dir ) ); } include_once $this->extension_dir . 'class.vendor-url.php'; AvadaRedux_VendorURL::$dir = $this->extension_dir; AvadaRedux_VendorURL::$url = $this->extension_url; }
private static function _vendor_plugin($register = true, $handle, $src_cdn, $deps, $ver, $footer_or_media, $is_script = true) { if (class_exists('AvadaRedux_VendorURL')) { $src = AvadaRedux_VendorURL::get_url($handle); if ($register) { self::_register($handle, $src, $deps, $ver, $footer_or_media, $is_script); } else { self::_enqueue($handle, $src, $deps, $ver, $footer_or_media, $is_script); } } else { if (!self::$_set) { self::$_parent->admin_notices[] = array('type' => 'error', 'msg' => sprintf(__('The <a href="%s">Vendor Support plugin</a> (or extension) is either not installed or not activated and thus, some controls may not render properly. Please ensure that it is installed and <a href="%s">activated</a>', 'avadaredux-framework'), 'https://github.com/avadareduxframework/avadaredux-vendor-support', admin_url('plugins.php')), 'id' => $handle . '23', 'dismiss' => false); self::$_set = true; } } }