AI Assistant
Notifications
Clear all

[Solved] login link

2 Posts
2 Users
0 Reactions
1,915 Views
(@electrochick)
New Member
Joined: 8 years ago
Posts: 3
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
  [#2271]

Hi,

Am really enjoying the plugin, thank's for that.

My theme uses a login with ajax modal pop up for user login/logout/registration

I have set up users to be logged before being able to comment in my test site. The link works but does not open the pop up

I have looked up in the form.php of the plugin and guess that"s where I could change / add something for the pop up to open.

Could you give me on a tip on how I could achieve that ?

Thank's

 



   
Quote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 8 years ago
Posts: 6645
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

Hi Electrochick,

I suggest you use the following code, put it in current active functions.php file, and you can make changes as like as you want: 

add_filter('loginout', 'myLoginLink');

if (!function_exists('myLoginLink')) {
   function myLoginLink($link) {
       if (preg_match('#<a[\r\n\t\s]*href=["\']([^"\']+)["\'][^<>]*>#isu', $link, $matches)) {
           $url = $matches[1] . '#mypopuplink';
           $link = '<a style="color:#000;font-size:16px;font-weight:700;" href="' . $url . '">';
           $link .= 'Login';
           $link .= '</a>';
       }
       return $link;
   }
}

 

 



   
ReplyQuote
Share:
Scroll to top