Skip to content

Instantly share code, notes, and snippets.

View meetawahab's full-sized avatar
🎯
Focusing

Abdul Wahab meetawahab

🎯
Focusing
View GitHub Profile
@meetawahab
meetawahab / example.php
Created August 17, 2020 06:30
Integration for local server to login with Google using LoginPress - Social Login v1.4.0
<?php
/**
* You've to download `cacert.pem` file from here => https://d.pr/f/p89oI5 and place it into the plugins SDK folder.
* Path => wp-content/plugins/loginpres-social-login/sdk/
* After that, copy the following PHP snippet and place it into loginpress-social-check.php # 198 after the object of Google_Client();
* Helping Screenshot => https://d.pr/i/IzIRNZ
* File path => wp-content/plugins/loginpres-social-login/classes/loginpress-social-check.php
* @since LoginPress - Socila Login version 1.4.0 while Google SDK version 2.7.0 */
$gClient->setHttpClient(new \GuzzleHttp\Client(array(
@meetawahab
meetawahab / style.css
Created October 26, 2020 05:41
Vertically center WordPress login form
// Add the following CSS snippet in LoginPress > Custom CSS/JS > Custom CSS section to vertically align center the login form.
body.login {
display: block !important;
}
#login {
position: absolute !important;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
@meetawahab
meetawahab / retrieve-password-message.php
Created December 9, 2020 09:24
Fix for space issue in username during WordPress reset password email link with the LoginPress - Hide Login Add-On.
<?php
function loginpress_reset_password_email( $message ) {
$user_data = '';
// If no value is posted, return false
if( ! isset( $_POST['user_login'] ) ) {
return '';
}