Hi,
It is surely not recommended to edit core files of the plugin.
You can achieve the same through functions.php
I’ve code this snippet for above 4 issues.
Read the comments “//” you will understand.
Last function xoo_cu_markup_shortcode
is for the shortcode, you can edit the way you want,
//Fix font awesome
add_action('wp_enqueue_scripts',function(){
//Removes plugin font awesome script
wp_dequeue_style( 'font-awesome');
//Add again
wp_enqueue_style('font-awesome-plugin','https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');
},1000);
//Remove default shortcode function from the plugin
function xoo_cu_el_frontend_handler(){
if( is_admin() ) return;
$handler = new Xoo_El_Frontend();
add_shortcode( 'xoo_el_action', 'xoo_cu_markup_shortcode' );
}
add_action('init','xoo_cu_el_frontend_handler');
//Editing Shortcode function
function xoo_cu_markup_shortcode($user_atts){
$atts = shortcode_atts( array(
'action' => 'login', // For version < 1.3
'type' => 'login',
'change_to' => 'logout',
), $user_atts, 'xoo_el_action');
$class = 'xoo-el-action-sc ';
if( is_user_logged_in() ){
if( $atts['change_to'] === 'myaccount' ) {
$change_to_link = wc_get_page_permalink( 'myaccount' );
$change_to_text = __('My account','easy-login-woocommerce');
}
else{
$gl_options = get_option('xoo-el-general-options');
$logout_link = !empty( $gl_options['m-logout-url'] ) ? $gl_options['m-logout-url'] : $_SERVER['REQUEST_URI'];
$change_to_link = wp_logout_url( $logout_link );
$change_to_text = __('Logout','easy-login-woocommerce');
}
$html = '<a href="'.$change_to_link.'" class="'.$class.'">'.$change_to_text.'</a>';
}
else{
$action_type = isset( $user_atts['action'] ) ? $user_atts['action'] : $atts['type'];
switch ( $action_type ) {
case 'login':
$class .= 'xoo-el-login-tgr';
$text = __('Login','easy-login-woocommerce');
break;
case 'register':
$class .= 'xoo-el-reg-tgr';
$text = __('Signup','easy-login-woocommerce');
break;
case 'lost-password':
$class .= 'xoo-el-lostpw-tgr';
$text = __('Lost Password','easy-login-woocommerce');
break;
default:
$class .= 'xoo-el-login-tgr';
$text = __('Login','easy-login-woocommerce');
break;
}
$html = '<a class="'.$class.'">'.$text.'</a>';
}
return $html;
}