', ''); if (file_exists(WP_PLUGIN_DIR . '/elementor/elementor.php')) { $action_url = wp_nonce_url('plugins.php?action=activate&plugin=' . $plugin . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $plugin); $button_label = __('Activate Elementor', 'thepack'); } else { $action_url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=elementor'), 'install-plugin_elementor'); $button_label = __('Install Elementor', 'thepack'); } $button = '

' . esc_html($button_label) . '

'; printf('

%2$s

%3$s
', esc_attr($class), wp_kses_post($message), wp_kses_post($button)); } public function get_version() { return $this->version; } public function init() { if ( ! $this->has_elementor() ) { return; } Icon_Element_Icons_Integration::get_instance(); } public function has_elementor() { return did_action( 'elementor/loaded' ); } public function my_plugin_action_links( $links ) { $links = array_merge( $links, array( '' . __( 'Get Pro', 'icon-element' ) . '', '' . __( 'Settings', 'icon-element' ) . '' ) ); return $links; } public function elementor() { return \Elementor\Plugin::instance(); } public static function is_iconelement_pro(){ include_once(ABSPATH.'wp-admin/includes/plugin.php'); return is_plugin_active( 'iconelement-pro/iconelement.php' ) ? true : false; } public function lang() { load_plugin_textdomain( 'icon-element', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); } public static function get_instance() { // If the single instance hasn't been set, set it now. if ( null == self::$instance ) { self::$instance = new self; self::$instance->icon_element_constant(); } return self::$instance; } private function icon_element_constant() { // Plugin Folder Path if (!defined('ICON_ELEM_DIR')) { define('ICON_ELEM_DIR', plugin_dir_path(__FILE__)); } // Plugin Folder URL if (!defined('ICON_ELEM_URL')) { define('ICON_ELEM_URL', plugin_dir_url(__FILE__)); } define( 'ICONELEMENT_ROOT_FILE__', __FILE__ ); require_once ICON_ELEM_DIR . 'admin/options.php'; require_once ICON_ELEM_DIR . 'admin/inc/sunrise.php'; require_once ICON_ELEM_DIR . 'includes/integration.php'; require_once ICON_ELEM_DIR . 'includes/optin.php'; } } } if ( ! function_exists( 'Icon_Element_Icons' ) ) { /** * Returns instance of the plugin class. * * @since 1.0.0 * @return Icon_Element_Icons */ function Icon_Element_Icons() { return Icon_Element_Icons::get_instance(); } } Icon_Element_Icons();