Skip to content

Instantly share code, notes, and snippets.

View Heateor's full-sized avatar

Team Heateor Heateor

View GitHub Profile
@Heateor
Heateor / social_login.php
Created September 18, 2016 13:39
Compatible with Theme My Login's "Email Only" type login system.
<?php
defined('ABSPATH') or die("Cheating........Uh!!");
/**
* File contains the functions necessary for Social Login functionality
*/
/**
* Render Social Login icons HTML.
*/
function the_champ_login_button($widget = false){
<?php
/*
Plugin Name: Super Socializer
Plugin URI: https://super-socializer-wordpress.heateor.com
Description: A complete 360 degree solution to provide all the social features like Social Login, Social Commenting, Social Sharing, Social Media follow and more.
Version: 7.11.10
Author: Team Heateor
Author URI: https://www.heateor.com
Text Domain: super-socializer
Domain Path: /languages
<?php
/**
* Display notification message when plugin options are saved
*/
function the_champ_settings_saved_notification(){
if(isset($_GET['settings-updated']) && sanitize_text_field($_GET['settings-updated']) == 'true'){
return '<div id="setting-error-settings_updated" class="updated settings-error notice is-dismissible below-h2">
<p><strong>' . __('Settings saved', 'super-socializer') . '</strong></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">' . __('Dismiss this notice', 'super-socializer') . '</span></button></div>';
}
}
<?php
/**
* Contains functions responsible for functionality at front-end of website
*
* @since 1.0.0
*
*/
/**
<?php
defined('ABSPATH') or die("Cheating........Uh!!");
/**
* File contains the functions necessary for Social Sharing functionality
*/
/**
* Render sharing interface html.
*/
function the_champ_prepare_sharing_html( $postUrl, $sharingType = 'horizontal', $displayCount, $totalShares, $shareCountTransientId, $standardWidget = false ) {
<?php
/**
* The file contains the class defining sharing networks and their sharer urls
*
* @since 1.0.0
*
*/
/**
<?php
defined('ABSPATH') or die("Cheating........Uh!!");
/**
* File contains the functions necessary for Social Login functionality
*/
/**
* Render Social Login icons HTML
*/
function the_champ_login_button($widget = false){
<?php
/**
* Display notification message when plugin options are saved
*/
function the_champ_settings_saved_notification(){
if(isset($_GET['settings-updated']) && sanitize_text_field($_GET['settings-updated']) == 'true'){
return '<div id="setting-error-settings_updated" class="updated settings-error notice is-dismissible below-h2">
<p><strong>' . __('Settings saved', 'super-socializer') . '</strong></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">' . __('Dismiss this notice', 'super-socializer') . '</span></button></div>';
}
}
<?php
/**
* Display notification message when plugin options are saved
*/
function the_champ_settings_saved_notification(){
if(isset($_GET['settings-updated']) && sanitize_text_field($_GET['settings-updated']) == 'true'){
return '<div id="setting-error-settings_updated" class="updated settings-error notice is-dismissible below-h2">
<p><strong>' . __('Settings saved', 'super-socializer') . '</strong></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">' . __('Dismiss this notice', 'super-socializer') . '</span></button></div>';
}
}
theChampFBKey = typeof theChampFBKey != 'undefined' ? theChampFBKey : '', theChampFBLang = typeof theChampFBLang != 'undefined' ? theChampFBLang : theChampDefaultLang, theChampFbIosLogin = typeof theChampFbIosLogin != 'undefined' ? theChampFbIosLogin : 0;
// general.js
function theChampPopup(e){window.open(e,"_blank","height=400,width=580,left=315,top=80,resizable,scrollbars,toolbar=0,personalbar=0,menubar=no,location=no,directories=no,status")}function theChampStrReplace(e,t,n){for(var r=0;r<e.length;r++){n=n.replace(new RegExp(e[r],"g"),t[r])}return n}function theChampCallAjax(e){if(typeof jQuery!="undefined"){e()}else{theChampGetScript("https://code.jquery.com/jquery-latest.min.js",e)}}function theChampGetScript(e,t){var n=document.createElement("script");n.src=e;var r=document.getElementsByTagName("head")[0],i=false;n.onload=n.onreadystatechange=function(){if(!i&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){i=true;t();n.onload=n.onreadystatechange=null;r.removeChild(n)}};r.a