function stc_publish_auto_callback() { $options = get_option('stc_options'); if (!$options['autotweet_flag']) { $options['autotweet_flag'] = false; } ?> <p><label>Automatically Tweet on Publish: <input type="checkbox" name="stc_options[autotweet_flag]" value="1" <?php checked('1', $options['autotweet_flag']); ?> /></label></p> <?php $tw = stc_get_credentials(true); if ($tw->screen_name) { echo "<p>Currently logged in as: <strong>{$tw->screen_name}</strong></p>"; } if ($options['autotweet_name']) { echo "<p>Autotweet set to Twitter User: <strong>{$options['autotweet_name']}</strong></p>"; } else { echo "<p>Autotweet not set to a Twitter user.</p>"; } echo '<p>To auto-publish new posts to any Twitter account, click this button and then log into that account to give the plugin access.</p><p>Authenticate for auto-tweeting: ' . stc_get_connect_button('publish_preauth', 'authorize') . '</p>'; echo '<p>Afterwards, you can use this button to log back into your own normal account, if you are posting to a different account than your normal one. </p><p>Normal authentication: ' . stc_get_connect_button('', 'authorize') . '</p>'; }
function stc_comm_login_button() { echo '<p>' . stc_get_connect_button('comment') . '</p>'; }
function stc_login_add_login_button() { global $action; if ($action == 'login') { echo '<p>' . stc_get_connect_button('login') . '</p><br />'; } }