Skip to content

Commit

Permalink
Adding social_connect_form action (to replace template tag). Updating…
Browse files Browse the repository at this point in the history
… version in readme. Updating change log & other comments in readme.
  • Loading branch information
thenbrent committed Aug 1, 2011
1 parent 883ba73 commit 7114c04
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 20 deletions.
30 changes: 22 additions & 8 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: thenbrent
Tags: facebook, wordpress.com, twitter, google, yahoo, social, login, register
Requires at least: 3.0
Tested up to: 3.2.1
Stable tag: 0.7
Stable tag: 0.8

Allow your visitors to comment, login and register with their Twitter, Facebook, Google, Yahoo or WordPress.com account.

Expand All @@ -19,17 +19,18 @@ It makes it super easy for new members to register with your site and existing m

Special thanks to:

* [Wirone](http://blog.wirone.info/) for polish translation and patches;
* [markusdrake](http://wordpress.org/support/profile/markusdrake) for patches and helping in the support forums; and
* [Geodanny](http://wordpress.org/support/profile/geodanny) for helping in the support forums.
* [markusdrake](http://wordpress.org/support/profile/markusdrake) for patches and helping in the support forums;
* [L D](http://wordpress.org/support/profile/enochfung) for patches and helping in the support forums;
* [Geodanny](http://wordpress.org/support/profile/geodanny) for helping in the support forums; and
* [Wirone](http://blog.wirone.info/) for polish translation and patches.

And everyone else in the forums helping out by sharing the fixes they find and answering others questions.
And everyone else in the forums sharing the fixes they find and answering each others questions.

== Installation ==

1. Upload everything into the "/wp-content/plugins/" directory of your WordPress site.
2. Activate in the "Plugins" admin panel.
3. Visit the "Settings | Social Connect" administration page to configure.
3. Visit the "Settings | Social Connect" administration page to configure social media providers.

== Frequently Asked Questions ==

Expand All @@ -41,13 +42,17 @@ Yes.

Yes.

= Can visitors connect with Social Connect to make a comment? =

Yes.

= Do I need to add template tags to my theme? =

Social Connect attempts to work with the default WordPress login and registration forms.
Social Connect attempts to work with the default WordPress comment, login and registration forms.

If you want to add the social connect login or registration forms to another location in your theme, you can insert the following code in that location:

`<?php if( 'sc_render_login_form_social_connect' ) sc_render_login_form_social_connect(); ?>`
`<?php do_action( 'social_connect_form' ); ?>`

= What do I do if the Rewrite Diagnostics fail? =

Expand Down Expand Up @@ -91,6 +96,12 @@ If you don't have White Label CMS installed, please double check your settings t

== Changelog ==

= 0.8 =
* Moving comments icons to top of comment form (using `comment_form_top` hook instead of `comment_form` hook)
* No longer relying on `file_get_contents()` function (using custom `sc_curl_get_contents()` function)
* Removing "Not You?" double-dialogue.
* Adding `social_connect_form` action to replace template tag with `do_action( 'social_connect_form' )`.

= 0.7 =
* Social Connect widget can now be customised
* l10n implemented
Expand Down Expand Up @@ -122,6 +133,9 @@ If you don't have White Label CMS installed, please double check your settings t

== Upgrade Notice ==

= 0.8 =
* Upgrade to fix bugs affecting Facebook connect on servers.

= 0.7 =
* Upgrade to be able to customise Social Connect widget & use in Polish.

Expand Down
16 changes: 4 additions & 12 deletions ui.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,10 @@ function sc_render_login_form_social_connect( $args = NULL ) {
</div> <!-- End of social_connect_ui div -->
<?php
}
add_action( 'login_form', 'sc_render_login_form_social_connect' );
add_action( 'register_form', 'sc_render_login_form_social_connect' );
add_action( 'after_signup_form', 'sc_render_login_form_social_connect' );


function sc_social_connect_add_meta_to_comment_form() {
$social_connect_provider = isset( $_COOKIE['social_connect_current_provider']) ? $_COOKIE['social_connect_current_provider'] : '';
if( $social_connect_provider != '' ) {
echo "<input type='hidden' name='social_connect_comment_via_provider' value='$social_connect_provider' />";
}
}
add_action( 'comment_form_top', 'sc_social_connect_add_meta_to_comment_form' );
add_action( 'login_form', 'sc_render_login_form_social_connect' );
add_action( 'register_form', 'sc_render_login_form_social_connect' );
add_action( 'after_signup_form', 'sc_render_login_form_social_connect' );
add_action( 'social_connect_form', 'sc_render_login_form_social_connect' );


function sc_social_connect_add_comment_meta( $comment_id ) {
Expand Down

0 comments on commit 7114c04

Please sign in to comment.