function jd_twitter_profile() { global $user_ID; get_currentuserinfo(); if (current_user_can('wpt_twitter_oauth') || current_user_can('update_core')) { $user_edit = isset($_GET['user_id']) ? (int) $_GET['user_id'] : $user_ID; $is_enabled = get_user_meta($user_edit, 'wp-to-twitter-enable-user', true); $twitter_username = get_user_meta($user_edit, 'wp-to-twitter-user-username', true); $wpt_remove = get_user_meta($user_edit, 'wpt-remove', true); ?> <h3><?php _e('WP Tweets User Settings', 'wp-to-twitter'); ?> </h3> <?php if (function_exists('wpt_connect_oauth_message')) { wpt_connect_oauth_message($user_edit); } ?> <table class="form-table"> <tr> <th scope="row"><?php _e("Use My Twitter Username", 'wp-to-twitter'); ?> </th> <td><input type="radio" name="wp-to-twitter-enable-user" id="wp-to-twitter-enable-user-3" value="mainAtTwitter"<?php if ($is_enabled == "mainAtTwitter") { echo " checked='checked'"; } ?> /> <label for="wp-to-twitter-enable-user-3"><?php _e("Tweet my posts with an @ reference to my username.", 'wp-to-twitter'); ?> </label><br /> <input type="radio" name="wp-to-twitter-enable-user" id="wp-to-twitter-enable-user-4" value="mainAtTwitterPlus"<?php if ($is_enabled == "mainAtTwitterPlus") { echo " checked='checked'"; } ?> /> <label for="wp-to-twitter-enable-user-3"><?php _e("Tweet my posts with an @ reference to both my username and to the main site username.", 'wp-to-twitter'); ?> </label> </td> </tr> <tr> <th scope="row"><label for="wp-to-twitter-user-username"><?php _e("Your Twitter Username", 'wp-to-twitter'); ?> </label></th> <td><input type="text" name="wp-to-twitter-user-username" id="wp-to-twitter-user-username" value="<?php echo esc_attr($twitter_username); ?> " /> <?php _e('Enter your own Twitter username.', 'wp-to-twitter'); ?> </td> </tr> <tr> <th scope="row"><label for="wpt-remove"><?php _e("Hide account name in Tweets", 'wp-to-twitter'); ?> </label></th> <td><input type="checkbox" name="wpt-remove" id="wpt-remove" value="on"<?php if ($wpt_remove == 'on') { echo ' checked="checked"'; } ?> /> <?php _e('Do not display my account in the #account# template tag.', 'wp-to-twitter'); ?> </td> </tr> <?php if (!function_exists('wpt_pro_exists')) { add_filter('wpt_twitter_user_fields', create_function('', 'return;')); } ?> <?php echo apply_filters('wpt_twitter_user_fields', $user_edit); ?> </table> <?php if (function_exists('wpt_schedule_tweet')) { if (function_exists('wtt_connect_oauth')) { wtt_connect_oauth($user_edit); } } } }
function jd_twitter_profile() { global $user_ID; get_currentuserinfo(); if (current_user_can('wpt_twitter_oauth') || current_user_can('update_core')) { $user_edit = isset($_GET['user_id']) ? (int) $_GET['user_id'] : $user_ID; $is_enabled = get_user_meta($user_edit, 'wp-to-twitter-enable-user', true); $twitter_username = get_user_meta($user_edit, 'wp-to-twitter-user-username', true); ?> <h3><?php _e('WP Tweets User Settings', 'wp-to-twitter'); ?> </h3> <?php if (function_exists('wpt_connect_oauth_message')) { wpt_connect_oauth_message($user_edit); } ?> <table class="form-table"> <tr> <th scope="row"><?php _e("Use My Twitter Username", 'wp-to-twitter'); ?> </th> <td><input type="radio" name="wp-to-twitter-enable-user" id="wp-to-twitter-enable-user-3" value="mainAtTwitter"<?php if ($is_enabled == "mainAtTwitter") { echo " checked='checked'"; } ?> /> <label for="wp-to-twitter-enable-user-3"><?php _e("Tweet my posts with an @ reference to my username.", 'wp-to-twitter'); ?> </label><br /> <input type="radio" name="wp-to-twitter-enable-user" id="wp-to-twitter-enable-user-4" value="mainAtTwitterPlus"<?php if ($is_enabled == "mainAtTwitterPlus") { echo " checked='checked'"; } ?> /> <label for="wp-to-twitter-enable-user-3"><?php _e("Tweet my posts with an @ reference to both my username and to the main site username.", 'wp-to-twitter'); ?> </label> </td> </tr> <tr> <th scope="row"><label for="wp-to-twitter-user-username"><?php _e("Your Twitter Username", 'wp-to-twitter'); ?> </label></th> <td><input type="text" name="wp-to-twitter-user-username" id="wp-to-twitter-user-username" value="<?php echo esc_attr($twitter_username); ?> " /> <?php _e('Enter your own Twitter username.', 'wp-to-twitter'); ?> </td> </tr> </table> <?php if (function_exists('wpt_schedule_tweet')) { ?> <?php if (function_exists('wtt_connect_oauth')) { wtt_connect_oauth($user_edit); } ?> <?php if (user_can($user_edit, 'update_core')) { echo "<p><em>" . __('Note: if all site administrators have set-up their own Twitter accounts, the primary site account (as set on the settings page) is not required, and won\'t be used.', 'wp-to-twitter') . '</em></p>'; } ?> <?php } ?> <?php } }