option] ) ) { return; } check_admin_referer( $this->option, "_ccnonce-$this->option" ); set_theme_mod( $this->option, $_POST[$this->option] ); } /** * Create the form elements. */ public function form() { $nonce = wp_nonce_field( $this->option, "_ccnonce-$this->option", true, // check referer false // do not echo ); $html = $nonce . $this->get_radio_fields(); $this->print_script( $html ); } /** * Create the jQuery function that inserts our form fields. * * @param string $html Radio buttons * * @return void */ protected function print_script( $html ) { $row = "'$this->table_header$html'"; ?> option, 'none' ); $radios = array( 'none', 'noise', 'blue', 'dark', 'space', 'debut_light', 'ripple' ); $html = '

'; foreach( $radios as $radio ) { $html .= '
'; $html .= sprintf( ' ', $this->option, $radio, "$this->option-$radio", // returns ' as value delimiters and has to be escaped addslashes( checked( $value, $radio, false ) ) ); $selected = ( $value == $radio ) ? ' of-radio-img-selected' : ''; $html .= '' . $radio . ''; $html .= '
'; } return "$html
"; } public function cc_background_styles() { $style = ''; echo $style; } }