@@ -104,8 +104,8 @@ function admin_init() {
104104 }
105105
106106 if ( isset ($ section ['desc ' ]) && !empty ($ section ['desc ' ]) ) {
107- $ section ['desc ' ] = '<div class="inside"> ' . $ section ['desc ' ]. '</div> ' ;
108- $ callback = create_function ('' , 'echo " ' . str_replace ('" ' , '\" ' , $ section ['desc ' ]). '"; ' );
107+ $ section ['desc ' ] = '<div class="inside"> ' . $ section ['desc ' ] . '</div> ' ;
108+ $ callback = create_function ('' , 'echo " ' . str_replace ( '" ' , '\" ' , $ section ['desc ' ] ) . '"; ' );
109109 } else if ( isset ( $ section ['callback ' ] ) ) {
110110 $ callback = $ section ['callback ' ];
111111 } else {
@@ -173,7 +173,7 @@ function callback_text( $args ) {
173173 $ value = esc_attr ( $ this ->get_option ( $ args ['id ' ], $ args ['section ' ], $ args ['std ' ] ) );
174174 $ size = isset ( $ args ['size ' ] ) && !is_null ( $ args ['size ' ] ) ? $ args ['size ' ] : 'regular ' ;
175175 $ type = isset ( $ args ['type ' ] ) ? $ args ['type ' ] : 'text ' ;
176- $ placeholder = empty ( $ args ['placeholder ' ] ) ? '' : ' placeholder=" ' . $ args ['placeholder ' ]. '" ' ;
176+ $ placeholder = empty ( $ args ['placeholder ' ] ) ? '' : ' placeholder=" ' . $ args ['placeholder ' ] . '" ' ;
177177
178178 $ html = sprintf ( '<input type="%1$s" class="%2$s-text" id="%3$s[%4$s]" name="%3$s[%4$s]" value="%5$s"%6$s/> ' , $ type , $ size , $ args ['section ' ], $ args ['id ' ], $ value , $ placeholder );
179179 $ html .= $ this ->get_field_description ( $ args );
@@ -199,10 +199,10 @@ function callback_number( $args ) {
199199 $ value = esc_attr ( $ this ->get_option ( $ args ['id ' ], $ args ['section ' ], $ args ['std ' ] ) );
200200 $ size = isset ( $ args ['size ' ] ) && !is_null ( $ args ['size ' ] ) ? $ args ['size ' ] : 'regular ' ;
201201 $ type = isset ( $ args ['type ' ] ) ? $ args ['type ' ] : 'number ' ;
202- $ placeholder = empty ( $ args ['placeholder ' ] ) ? '' : ' placeholder=" ' . $ args ['placeholder ' ]. '" ' ;
203- $ min = empty ( $ args ['min ' ] ) ? '' : ' min=" ' . $ args ['min ' ]. '" ' ;
204- $ max = empty ( $ args ['max ' ] ) ? '' : ' max=" ' . $ args ['max ' ]. '" ' ;
205- $ step = empty ( $ args ['step ' ] ) ? '' : ' step="1 " ' ;
202+ $ placeholder = empty ( $ args ['placeholder ' ] ) ? '' : ' placeholder=" ' . $ args ['placeholder ' ] . '" ' ;
203+ $ min = empty ( $ args ['min ' ] ) ? '' : ' min=" ' . $ args ['min ' ] . '" ' ;
204+ $ max = empty ( $ args ['max ' ] ) ? '' : ' max=" ' . $ args ['max ' ] . '" ' ;
205+ $ step = empty ( $ args ['max ' ] ) ? '' : ' step=" ' . $ args [ ' step ' ] . ' " ' ;
206206
207207 $ html = sprintf ( '<input type="%1$s" class="%2$s-number" id="%3$s[%4$s]" name="%3$s[%4$s]" value="%5$s"%6$s%7$s%8$s%9$s/> ' , $ type , $ size , $ args ['section ' ], $ args ['id ' ], $ value , $ placeholder , $ min , $ max , $ step );
208208 $ html .= $ this ->get_field_description ( $ args );
0 commit comments