@@ -913,13 +913,11 @@ function Options_main() {
913913 }
914914
915915 // Print a text input for a plugin option
916- function Print_option_text_input ($ id , $ default_value = null , $ info = null ) {
917- $ options = get_option ('browserid_options ' );
918- $ option_value = (empty ($ options [$ id ]) ? '' : $ options [$ id ]);
919- echo sprintf ("<input id='%s' name='browserid_options[%s]'
920- type='text' size='50' value='%s' /> " ,
921- $ id ,
922- $ id ,
916+ function Print_option_text_input ($ option_name , $ default_value = null , $ info = null ) {
917+ $ option_value = $ this ->Get_option ($ option_name , $ default_value );
918+ echo sprintf ("<input id='%s' name='browserid_options[%s]' type='text' size='50' value='%s' /> " ,
919+ $ option_name ,
920+ $ option_name ,
923921 htmlspecialchars ($ option_value , ENT_QUOTES ));
924922
925923 if ($ info ) {
@@ -932,8 +930,10 @@ function Print_option_text_input($id, $default_value = null, $info = null) {
932930 // default value
933931 function Get_option ($ option_name , $ default_value = '' ) {
934932 $ options = get_option ('browserid_options ' );
935- if (isset ($ options [$ option_name ]))
933+ if (isset ($ options [$ option_name ])
934+ && !empty ($ options [$ option_name ])) {
936935 return $ options [$ option_name ];
936+ }
937937 return $ default_value ;
938938 }
939939
@@ -1041,7 +1041,7 @@ function Option_comment_html() {
10411041 }
10421042
10431043 function Get_option_comment_html () {
1044- return $ this ->get_option ('browserid_comment_html ' , __ ('post comment ' , c_bid_text_domain));
1044+ return $ this ->Get_option ('browserid_comment_html ' , __ ('post comment ' , c_bid_text_domain));
10451045 }
10461046
10471047 // Enable bbPress integration
0 commit comments