%s', AP_BASENAME, __('Settings') )
);
}
return $links;
} // end plugin_action()
/* ---------------------------------------------------------------------*/
function ap_admin_header() {
echo '
'
.'
'
.'
'.__('Help').'
'
.'
'
.'- '.__('Use [user metakey] in a page or post.','amr-personalise' ). ' ' .__('See also:','amr-personalise').'http://wordpress.org/extend/plugins/amr-personalise/installation/'.'
'
.'- '.__('Admin users only','amr-personalise').' '.__('Add "?ID=x" to the page url to dump all user info for user with id x.' ).'
'
.'- '.__('If WP_DEBUG is on, a debug log may be available here: ','amr-personalise' )
.$log_file
.' '.__('or try here:','amr-personalise').''.$maybe_log_url.''
.' '
.'?'
.'
'
.'
'.
__('You may find these user related plugins helpful too:','amr-personalise' )
.'
'
.'
';
}
/* ---------------------------------------------------------------------*/
function ap_options_panel() {
// if (!check_admin_referer('amr-personalise')) die;
if (isset($_REQUEST['uninstall']) OR isset($_REQUEST['reallyuninstall'])) { /* */
amr_personalise_uninstall();
return;
}
else {
$ifnoname = get_option('ap-ifnoname');
if (!($ifnoname)) $ifnoname = '';
$fromaddr = get_option('ap-fromaddr');
$fromname = get_option('ap-fromname');
$enable = get_option('ap-enable-senderchange');
if (empty($enable)) $enable=false;
if ((isset($_POST['action'])) and ($_POST['action'] == "save")) {/* Validate the input and save */
if (isset($_POST['ifnoname'])) {
$ifnoname = $_POST['ifnoname'];
update_option('ap-ifnoname', $ifnoname);
}
if (isset($_POST['fromaddr'])) {
$fromaddr = $_POST['fromaddr'];
update_option('ap-fromaddr', $fromaddr);
}
if (isset($_POST['fromname'])) {
$fromname = $_POST['fromname'];
update_option('ap-fromname', $fromname);
}
if (isset($_POST['enable'])) {
if ($_POST['enable'] === 'true') $enable = true;
else $enable = false;
update_option('ap-enable-senderchange', $enable);
}
else {$enable = false; update_option('ap-enable-senderchange', false); }
}?>