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', 'silk', 'grid' ); $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; } } // Default background image. function ifeature_background_image( $options ) { $imagepath = get_template_directory_uri() . '/cyberchimps/lib/images/'; $options = array( 'none' => $imagepath . 'backgrounds/thumbs/none.png', 'noise' => $imagepath . 'backgrounds/thumbs/noise.png', 'blue' => $imagepath . 'backgrounds/thumbs/blue.png', 'dark' => $imagepath . 'backgrounds/thumbs/dark.png', 'space' => $imagepath . 'backgrounds/thumbs/space.png', 'debut_light' => $imagepath . 'backgrounds/thumbs/debut_light.png', 'silk' => $imagepath . 'backgrounds/thumbs/silk.png', 'grid' => $imagepath . 'backgrounds/thumbs/grid.png', ); return $options; } add_filter( 'cyberchimps_background_image', 'ifeature_background_image' ); // default background color function ifeature_default_background_color() { $color = 'f7f7f7'; return $color; } add_filter( 'default_background_color', 'ifeature_default_background_color' );