Advertisements

theme_options_render_page

Definition:
function theme_options_render_page() {}

Returns the options array for Twenty Eleven.

Source code

function theme_options_render_page() {

	?>

	<div class="wrap">

		<?php screen_icon(); ?>

		<h2><?php printf( __( '%s Theme Options', 'twentyeleven' ), get_current_theme() ); ?></h2>

		<?php settings_errors(); ?>



		<form method="post" action="options.php">

			<?php

				settings_fields( 'twentyeleven_options' );

				$options = twentyeleven_get_theme_options();

				$default_options = twentyeleven_get_default_theme_options();

			?>



			<table class="form-table">



				<tr valign="top" class="image-radio-option color-scheme"><th scope="row"><?php _e( 'Color Scheme', 'twentyeleven' ); ?></th>

					<td>

						<fieldset><legend class="screen-reader-text"><span><?php _e( 'Color Scheme', 'twentyeleven' ); ?></span></legend>

						<?php

							foreach ( twentyeleven_color_schemes() as $scheme ) {

								?>

								<div class="layout">

								<label class="description">

									<input type="radio" name="twentyeleven_theme_options[color_scheme]" value="<?php echo esc_attr( $scheme['value'] ); ?>" <?php checked( $options['color_scheme'], $scheme['value'] ); ?> />

									<input type="hidden" id="default-color-<?php echo esc_attr( $scheme['value'] ); ?>" value="<?php echo esc_attr( $scheme['default_link_color'] ); ?>" />

									<span>

										<img src="<?php echo esc_url( $scheme['thumbnail'] ); ?>" width="136" height="122" alt="" />

										<?php echo $scheme['label']; ?>

									</span>

								</label>

								</div>

								<?php

							}

						?>

						</fieldset>

					</td>

				</tr>



				<tr valign="top"><th scope="row"><?php _e( 'Link Color', 'twentyeleven' ); ?></th>

					<td>

						<fieldset><legend class="screen-reader-text"><span><?php _e( 'Link Color', 'twentyeleven' ); ?></span></legend>

							<input type="text" name="twentyeleven_theme_options[link_color]" id="link-color" value="<?php echo esc_attr( $options['link_color'] ); ?>" />

							<a href="#" class="pickcolor hide-if-no-js" id="link-color-example"></a>

							<input type="button" class="pickcolor button hide-if-no-js" value="<?php esc_attr_e( 'Select a Color', 'twentyeleven' ); ?>" />

							<div id="colorPickerDiv" style="z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;"></div>

							<br />

							<span><?php printf( __( 'Default color: %s', 'twentyeleven' ), '<span id="default-color">' . twentyeleven_get_default_link_color( $options['color_scheme'] ) . '</span>' ); ?></span>

						</fieldset>

					</td>

				</tr>



				<tr valign="top" class="image-radio-option theme-layout"><th scope="row"><?php _e( 'Default Layout', 'twentyeleven' ); ?></th>

					<td>

						<fieldset><legend class="screen-reader-text"><span><?php _e( 'Color Scheme', 'twentyeleven' ); ?></span></legend>

						<?php

							foreach ( twentyeleven_layouts() as $layout ) {

								?>

								<div class="layout">

								<label class="description">

									<input type="radio" name="twentyeleven_theme_options[theme_layout]" value="<?php echo esc_attr( $layout['value'] ); ?>" <?php checked( $options['theme_layout'], $layout['value'] ); ?> />

									<span>

										<img src="<?php echo esc_url( $layout['thumbnail'] ); ?>" width="136" height="122" alt="" />

										<?php echo $layout['label']; ?>

									</span>

								</label>

								</div>

								<?php

							}

						?>

						</fieldset>

					</td>

				</tr>

			</table>



			<?php submit_button(); ?>

		</form>

	</div>

	<?php

}

14630

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: