<?php
/*
Plugin Name: No Role for New Users
Plugin URI: http://wordpress.org/support/topic/140753
Description: Adds "No role for this blog" choice to New User Default Role setting (Options > General).
Version: 0.1
Author: Kaf Oseo
Author URI: http://szub.net
Copyright (c) 2007 Kaf Oseo (http://szub.net)
No Role for New Users is released under the GNU General
Public License (GPL) http://www.gnu.org/licenses/gpl.txt
This is a WordPress plugin (http://wordpress.org).
*/
function szub_add_NoRole_regtext($text) {
/* >> user-configurable variable */
$norole_text = 'Note that new users must first be confirmed by an administrator.';
/* << user-configurable variable */
$text = str_replace(__('Registration complete. Please check your e-mail.'), __('Registration complete. Please check your e-mail.') . ' ' . $norole_text, $text);
return $text;
}
function szub_add_NoRole($text) {
$text = str_replace('<select name="default_role" id="default_role">', '<select name="default_role" id="default_role">' . "\n\t" . '<option value=\'\'>' . __('— No role for this blog —') . '</option>', $text);
return $text;
}
if(strstr($_SERVER['REQUEST_URI'], '/wp-login.php?checkemail=registered')) {
ob_start('szub_add_NoRole_regtext');
}
if(strstr($_SERVER['REQUEST_URI'], 'wp-admin/options-general.php')) {
ob_start('szub_add_NoRole');
}
?>