May 2017
Beginner to intermediate
536 pages
14h 25m
English
We need to implement the login strategy for each social network. So we need a base class for handling common functionality for all the social networks. Let's create a new class called WPWAF_Social_Connect inside a new file called class-wpwaf-social-connect.php. This file needs to be created in the root of our plugins folder. As usual, we need to include this file inside the WPWAF_Forum class. The following code contains the initial version of the WPWAF_Social_Connect class:
<?php class WPWAF_Social_Connect{ public function callback_url(){ $url = 'http://' . $_SERVER["HTTP_HOST"] . $_SERVER["PHP_SELF"]; if(strpos($url, '?')===false){ $url .= '?'; }else{ $url .= '&'; } return $url; } public function ...Read now
Unlock full access