Here’s a little plugin I wrote for my own purpose. It saves the flickr profile url in user option. You may clean it and use it for what you want to do.
File: ptFlickR.php
<?php
/*
Plugin Name: ptFlickR
Plugin URI: https://www.alakhnor.com/post-thumb
Description: Adds FlickR profile url to user profile screen.
Version: 1.0
Author: Alakhnor
Author URI: https://www.alakhnor.com/post-thumb
Copyright (c) 2007 Alakhnor (https://www.alakhnor.com/post-thumb) for ptFlickR
ptFlickR is released under the GNU General Public License (GPL)
https://www.gnu.org/licenses/gpl.txt
This is a WordPress 2 plugin (https://www.remarpro.com).
*/
// Defines path & urls
define('PTF_BASENAME', dirname(plugin_basename(__FILE__)));
define('PTF_ABSPATH', ABSPATH.'wp-content/plugins/' . PTF_BASENAME.'/');
// calls function & class files
require(PTF_ABSPATH . 'ptFlickR-admin.php');
?>
File: ptFlickR-admin.php
<?php
$PTFlickRAdmin = new pta_author_flickr_admin();
class pta_author_flickr_admin {
/************************************************************
/* constructor
************************************************************/
function pta_author_flickr_admin() {
$this->init();
}
/************************************************************
/* init()
************************************************************/
function init() {
add_action('edit_user_profile', array(&$this, 'display_flickr'));
add_action('show_user_profile', array(&$this, 'display_flickr'));
add_action('profile_update', array(&$this, 'save_flickr'));
}
/************************************************************
/* display_flickr()
************************************************************/
function display_flickr() {
$author_id = $GLOBALS['profileuser']->user_login;
$flickr_url = trailingslashit(get_user_option('flickrurl'));
// Input form
?>
<fieldset>
<legend><?php _e('Additional informations'); ?></legend>
<label><?php _e('FlickR profile:'); ?></label>
<input type="text" style="font-size: 1.2em;" name="flickrurl" value="<?php echo $flickr_url; ?>" />
</fieldset>
<?php
}
/************************************************************
/* save_flickr()
************************************************************/
function save_flickr($user_ID) {
if (isset($_POST['flickrurl'])) {
$flickrprofile = $this->return_profile($_POST['flickrurl']);
update_user_option($user_ID, 'flickrurl', $_POST['flickrurl']);
update_user_option($user_ID, 'flickrprofile', $flickrprofile);
}
return $user_ID;
}
/************************************************************
/* return_profile()
************************************************************/
function return_profile($flickrurl) {
return $flickrurl;
}
} // flickr_admin
?>