forked from rodrigoprimo/social-connect
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3ca8e83
commit 63e2daa
Showing
7 changed files
with
1,534 additions
and
1,534 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
if( !defined( 'SOCIAL_CONNECT_PLUGIN_URL' )) { | ||
define( 'SOCIAL_CONNECT_PLUGIN_URL', plugins_url() . '/' . basename( dirname( __FILE__ ))); | ||
} | ||
|
||
<?php | ||
|
||
if( !defined( 'SOCIAL_CONNECT_PLUGIN_URL' )) { | ||
define( 'SOCIAL_CONNECT_PLUGIN_URL', plugins_url() . '/' . basename( dirname( __FILE__ ))); | ||
} | ||
|
||
define( 'SOCIAL_CONNECT_GOOGLE_PLUS_REDIRECT_URL', home_url( 'index.php?social-connect=google-plus-callback' ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
<?php | ||
|
||
function sc_add_stylesheets(){ | ||
if( !wp_style_is( 'social_connect', 'registered' ) ) { | ||
wp_register_style( "social_connect", SOCIAL_CONNECT_PLUGIN_URL . "/media/css/style.css" ); | ||
} | ||
|
||
if ( did_action( 'wp_print_styles' ) ) { | ||
wp_print_styles( 'social_connect' ); | ||
wp_print_styles( 'wp-jquery-ui-dialog' ); | ||
} else { | ||
wp_enqueue_style( "social_connect" ); | ||
wp_enqueue_style( "wp-jquery-ui-dialog" ); | ||
} | ||
} | ||
add_action( 'login_enqueue_scripts', 'sc_add_stylesheets' ); | ||
add_action( 'wp_head', 'sc_add_stylesheets' ); | ||
|
||
|
||
function sc_add_admin_stylesheets(){ | ||
if( !wp_style_is( 'social_connect', 'registered' ) ) { | ||
wp_register_style( "social_connect", SOCIAL_CONNECT_PLUGIN_URL . "/media/css/style.css" ); | ||
} | ||
|
||
if ( did_action( 'wp_print_styles' )) { | ||
wp_print_styles( 'social_connect' ); | ||
} else { | ||
wp_enqueue_style( "social_connect" ); | ||
} | ||
} | ||
add_action( 'admin_print_styles', 'sc_add_admin_stylesheets' ); | ||
|
||
|
||
function sc_add_javascripts(){ | ||
$deps = array( 'jquery', 'jquery-ui-core' ); | ||
$wordpress_enabled = get_option( 'social_connect_wordpress_enabled' ); | ||
|
||
if ( $wordpress_enabled ) { | ||
$deps[] = 'jquery-ui-dialog'; | ||
} | ||
|
||
if( ! wp_script_is( 'social_connect', 'registered' ) ) | ||
wp_register_script( 'social_connect', SOCIAL_CONNECT_PLUGIN_URL . '/media/js/connect.js', $deps ); | ||
|
||
wp_enqueue_script( 'social_connect' ); | ||
wp_localize_script( 'social_connect', 'social_connect_data', array( 'wordpress_enabled' => $wordpress_enabled ) ); | ||
} | ||
add_action( 'login_enqueue_scripts', 'sc_add_javascripts' ); | ||
add_action( 'wp_enqueue_scripts', 'sc_add_javascripts' ); | ||
<?php | ||
|
||
function sc_add_stylesheets(){ | ||
if( !wp_style_is( 'social_connect', 'registered' ) ) { | ||
wp_register_style( "social_connect", SOCIAL_CONNECT_PLUGIN_URL . "/media/css/style.css" ); | ||
} | ||
|
||
if ( did_action( 'wp_print_styles' ) ) { | ||
wp_print_styles( 'social_connect' ); | ||
wp_print_styles( 'wp-jquery-ui-dialog' ); | ||
} else { | ||
wp_enqueue_style( "social_connect" ); | ||
wp_enqueue_style( "wp-jquery-ui-dialog" ); | ||
} | ||
} | ||
add_action( 'login_enqueue_scripts', 'sc_add_stylesheets' ); | ||
add_action( 'wp_head', 'sc_add_stylesheets' ); | ||
|
||
|
||
function sc_add_admin_stylesheets(){ | ||
if( !wp_style_is( 'social_connect', 'registered' ) ) { | ||
wp_register_style( "social_connect", SOCIAL_CONNECT_PLUGIN_URL . "/media/css/style.css" ); | ||
} | ||
|
||
if ( did_action( 'wp_print_styles' )) { | ||
wp_print_styles( 'social_connect' ); | ||
} else { | ||
wp_enqueue_style( "social_connect" ); | ||
} | ||
} | ||
add_action( 'admin_print_styles', 'sc_add_admin_stylesheets' ); | ||
|
||
|
||
function sc_add_javascripts(){ | ||
$deps = array( 'jquery', 'jquery-ui-core' ); | ||
$wordpress_enabled = get_option( 'social_connect_wordpress_enabled' ); | ||
|
||
if ( $wordpress_enabled ) { | ||
$deps[] = 'jquery-ui-dialog'; | ||
} | ||
|
||
if( ! wp_script_is( 'social_connect', 'registered' ) ) | ||
wp_register_script( 'social_connect', SOCIAL_CONNECT_PLUGIN_URL . '/media/js/connect.js', $deps ); | ||
|
||
wp_enqueue_script( 'social_connect' ); | ||
wp_localize_script( 'social_connect', 'social_connect_data', array( 'wordpress_enabled' => $wordpress_enabled ) ); | ||
} | ||
add_action( 'login_enqueue_scripts', 'sc_add_javascripts' ); | ||
add_action( 'wp_enqueue_scripts', 'sc_add_javascripts' ); |
Oops, something went wrong.