Notice fixes for the widgets admin page see #7509.

git-svn-id: http://svn.automattic.com/wordpress/trunk@8945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2008-09-21 20:57:04 +00:00
parent 95e26235ad
commit cd7d1d1aab
2 changed files with 8 additions and 8 deletions

View File

@ -224,7 +224,7 @@ function wp_widget_control( $sidebar_args ) {
$widget_id = $sidebar_args['widget_id'];
$sidebar_id = isset($sidebar_args['id']) ? $sidebar_args['id'] : false;
$control = $wp_registered_widget_controls[$widget_id];
$control = isset($wp_registered_widget_controls[$widget_id]) ? $wp_registered_widget_controls[$widget_id] : 0;
$widget = $wp_registered_widgets[$widget_id];
$key = $sidebar_id ? array_search( $widget_id, $sidebars_widgets[$sidebar_id] ) : 'no-key'; // position of widget in sidebar

View File

@ -680,7 +680,7 @@ function wp_widget_pages( $args ) {
*/
function wp_widget_pages_control() {
$options = $newoptions = get_option('widget_pages');
if ( $_POST['pages-submit'] ) {
if ( isset($_POST['pages-submit']) ) {
$newoptions['title'] = strip_tags(stripslashes($_POST['pages-title']));
$sortby = stripslashes( $_POST['pages-sortby'] );
@ -811,7 +811,7 @@ function wp_widget_archives($args) {
*/
function wp_widget_archives_control() {
$options = $newoptions = get_option('widget_archives');
if ( $_POST["archives-submit"] ) {
if ( isset($_POST["archives-submit"]) ) {
$newoptions['count'] = isset($_POST['archives-count']);
$newoptions['dropdown'] = isset($_POST['archives-dropdown']);
$newoptions['title'] = strip_tags(stripslashes($_POST["archives-title"]));
@ -871,7 +871,7 @@ function wp_widget_meta($args) {
*/
function wp_widget_meta_control() {
$options = $newoptions = get_option('widget_meta');
if ( $_POST["meta-submit"] ) {
if ( isset($_POST["meta-submit"]) ) {
$newoptions['title'] = strip_tags(stripslashes($_POST["meta-title"]));
}
if ( $options != $newoptions ) {
@ -916,7 +916,7 @@ function wp_widget_calendar($args) {
*/
function wp_widget_calendar_control() {
$options = $newoptions = get_option('widget_calendar');
if ( $_POST["calendar-submit"] ) {
if ( isset($_POST["calendar-submit"]) ) {
$newoptions['title'] = strip_tags(stripslashes($_POST["calendar-title"]));
}
if ( $options != $newoptions ) {
@ -1367,7 +1367,7 @@ add_action('switch_theme', 'wp_flush_widget_recent_entries');
*/
function wp_widget_recent_entries_control() {
$options = $newoptions = get_option('widget_recent_entries');
if ( $_POST["recent-entries-submit"] ) {
if ( isset($_POST["recent-entries-submit"]) ) {
$newoptions['title'] = strip_tags(stripslashes($_POST["recent-entries-title"]));
$newoptions['number'] = (int) $_POST["recent-entries-number"];
}
@ -1450,7 +1450,7 @@ add_action( 'wp_set_comment_status', 'wp_delete_recent_comments_cache' );
*/
function wp_widget_recent_comments_control() {
$options = $newoptions = get_option('widget_recent_comments');
if ( $_POST["recent-comments-submit"] ) {
if ( isset($_POST["recent-comments-submit"]) ) {
$newoptions['title'] = strip_tags(stripslashes($_POST["recent-comments-title"]));
$newoptions['number'] = (int) $_POST["recent-comments-number"];
}
@ -1904,7 +1904,7 @@ function wp_widget_tag_cloud($args) {
function wp_widget_tag_cloud_control() {
$options = $newoptions = get_option('widget_tag_cloud');
if ( $_POST['tag-cloud-submit'] ) {
if ( isset($_POST['tag-cloud-submit']) ) {
$newoptions['title'] = strip_tags(stripslashes($_POST['tag-cloud-title']));
}