From 51f1fb4a1b480086695402662c77d86d074be2ae Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Fri, 5 May 2017 16:24:38 -0400 Subject: [PATCH] fixing undefined variable notices in the index file power, sewer, water variables were not being set initially and were throwing errors , pre defined the variables to avoid the notices --- index.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index 2f56322..815b554 100755 --- a/index.php +++ b/index.php @@ -115,7 +115,7 @@ function petosega_add_metaboxes() { */ function petosega_water() { global $post; - + $checked = ''; // Get the features for the post. $water = get_post_meta( $post->ID, 'petosega_water', true ); @@ -161,7 +161,7 @@ function petosega_water() { */ function petosega_loop() { global $post; - + $value = ''; // Noncename needed to verify where the data originated. $nonce = wp_create_nonce( 'petosegameta-meta-noncename' ); echo ''; @@ -189,7 +189,7 @@ function petosega_loop() { */ function petosega_sewer() { global $post; - + $checked = ''; // Noncename needed to verify where the data originated. $nonce = wp_create_nonce( 'petosegameta-meta-noncename' ); echo ''; @@ -200,9 +200,11 @@ function petosega_sewer() { if ( "yes" === $sewer ) { $checked = 'checked="checked"'; } + ?> /> '; @@ -262,6 +264,7 @@ function petosega_power() { */ function petosega_save_meta() { global $post; + print_r($_POST); if ( ! wp_verify_nonce( $_POST['petosegameta-meta-noncename'], 'petosegameta-meta-noncename' ) ) { return $post->ID; } -- 2.17.1