All pastes #1925672 Raw Edit

Function File

public php v1 · immutable
#1925672 ·published 2010-08-26 06:23 UTC
rendered paste body
<?phpadd_action('show_user_profile', 'wpsplash_extraProfileFields');add_action('edit_user_profile', 'wpsplash_extraProfileFields');add_action('personal_options_update', 'wpsplash_saveExtraProfileFields');add_action('edit_user_profile_update', 'wpsplash_saveExtraProfileFields');function wpsplash_saveExtraProfileFields($userID) {	if (!current_user_can('edit_user', $userID)) {		return false;	}	update_usermeta($userID, 'twitter', $_POST['twitter']);	update_usermeta($userID, 'facebook', $_POST['facebook']);	update_usermeta($userID, 'linkedin', $_POST['linkedin']);	update_usermeta($userID, 'digg', $_POST['digg']);	update_usermeta($userID, 'flickr', $_POST['flickr']);}function wpsplash_extraProfileFields($user){?>	<h3>Social Networking Connections</h3>	<table class='form-table'>		<tr>			<th><label for='twitter'>Twitter</label></th>			<td>				<input type='text' name='twitter' id='twitter' value='<?php echo esc_attr(get_the_author_meta('twitter', $user->ID)); ?>' class='regular-text' />				<br />				<span class='description'>Please enter your Twitter username. http://www.twitter.com/<strong>username</strong></span>			</td>		</tr>		<tr>			<th><label for='facebook'>Facebook</label></th>			<td>				<input type='text' name='facebook' id='facebook' value='<?php echo esc_attr(get_the_author_meta('facebook', $user->ID)); ?>' class='regular-text' />				<br />				<span class='description'>Please enter your Facebook username/alias. http://www.facebook.com/<strong>username</strong></span>			</td>		</tr>		<tr>			<th><label for='linkedin'>LinkedIn</label></th>			<td>				<input type='text' name='linkedin' id='linkedin' value='<?php echo esc_attr(get_the_author_meta('linkedin', $user->ID)); ?>' class='regular-text' />				<br />				<span class='description'>Please enter your LinkedIn username. http://www.linkedin.com/in/<strong>username</strong></span>			</td>		</tr>		<tr>			<th><label for='digg'>Digg</label></th>			<td>				<input type='text' name='digg' id='digg' value='<?php echo esc_attr(get_the_author_meta('digg', $user->ID)); ?>' class='regular-text' />				<br />				<span class='description'>Please enter your Digg username. http://digg.com/users/<strong>username</strong></span>			</td>		</tr>		<tr>			<th><label for='flickr'>Flickr</label></th>			<td>				<input type='text' name='flickr' id='flickr' value='<?php echo esc_attr(get_the_author_meta('flickr', $user->ID)); ?>' class='regular-text' />				<br />				<span class='description'>Please enter your flickr username. http://www.flickr.com/photos/<strong>username</strong>/</span>			</td>		</tr>	</table><?php } ?>