/** * Print social buttons * * @return void * @since 1.0.0 * @author Emanuela Castorina */ public function social_buttons($template_part = '', $is_shortcode = false) { $enabled_social = YITH_WC_Social_Login()->enabled_social; $template_part = empty($template_part) ? 'social-buttons' : $template_part; if ($is_shortcode) { ob_start(); } if (!is_user_logged_in() && !empty($enabled_social)) { yit_plugin_get_template(YITH_YWSL_DIR, $template_part . '.php', array('label' => get_option('ywsl_social_label'), 'socials' => $enabled_social, 'label_checkout' => get_option('ywsl_social_label_checkout'))); } if ($is_shortcode) { return ob_get_clean(); } }
function yith_ywsl_constructor() { // Load YWSL text domain ___________________________________ load_plugin_textdomain('yith-woocommerce-social-login', false, dirname(plugin_basename(__FILE__)) . '/languages/'); if (session_id() == '') { session_start(); } require_once YITH_YWSL_INC . 'functions.yith-social-login.php'; require_once YITH_YWSL_INC . 'class-yith-social-login.php'; if (is_admin()) { require_once YITH_YWSL_INC . 'class-yith-social-login-admin.php'; YITH_WC_Social_Login_Admin(); } else { require_once YITH_YWSL_INC . 'class-yith-social-login-frontend.php'; YITH_WC_Social_Login_Frontend(); } YITH_WC_Social_Login(); }