@@ -62,7 +62,7 @@ public static function form_table( $rows, $formdata = null ) {
6262 *
6363 * @return string
6464 */
65- public static function form ( $ inputs , $ formdata = null , $ nonce ) {
65+ public static function form ( $ inputs , $ formdata = null , $ nonce = ' update_options ' ) {
6666 $ output = '' ;
6767 foreach ( $ inputs as $ input ) {
6868 $ output .= self ::input ( $ input , $ formdata );
@@ -842,7 +842,10 @@ class scbRadiosField extends scbSelectField {
842842 * @return string
843843 */
844844 protected function _render_specific ( $ args ) {
845-
845+ $ args = wp_parse_args ( $ args , array (
846+ 'extra ' => array (),
847+ ) );
848+
846849 if ( array ( 'foo ' ) === $ args ['selected ' ] ) {
847850 // radio buttons should always have one option selected
848851 $ args ['selected ' ] = key ( $ args ['choices ' ] );
@@ -857,6 +860,7 @@ protected function _render_specific( $args ) {
857860 'type ' => 'radio ' ,
858861 'value ' => $ value ,
859862 'checked ' => ( $ value == $ args ['selected ' ] ),
863+ 'extra ' => $ args ['extra ' ],
860864 'desc ' => $ title ,
861865 'desc_pos ' => 'after ' ,
862866 ) );
@@ -895,6 +899,7 @@ protected function _render( $args ) {
895899 $ args = wp_parse_args ( $ args , array (
896900 'numeric ' => false , // use numeric array instead of associative
897901 'checked ' => null ,
902+ 'extra ' => array (),
898903 ) );
899904
900905 if ( ! is_array ( $ args ['checked ' ] ) ) {
@@ -908,6 +913,7 @@ protected function _render( $args ) {
908913 'type ' => 'checkbox ' ,
909914 'value ' => $ value ,
910915 'checked ' => in_array ( $ value , $ args ['checked ' ] ),
916+ 'extra ' => $ args ['extra ' ],
911917 'desc ' => $ title ,
912918 'desc_pos ' => 'after ' ,
913919 ) );
0 commit comments