'2c-l', ); $options = array_merge($defaults, (array) get_option('sandbox_options')); if ( isset($options[$name]) ) return $options[$name]; return false; } function sandbox_set_options($new_options) { $options = (array) get_option('sandbox_options'); $options = array_merge($options, (array) $new_options); return update_option('sandbox_options', $options); } // Template tag: echoes a stylesheet link if one is selected function sandbox_stylesheets() { $skin = sandbox_get_option('skin'); if ( $skin != 'none' ) { ?> " title="Sandbox" /> Skip navigation
\n"; } // Template tag: echoes a page list for navigation menus function sandbox_globalnav() { if ( !sandbox_get_option('globalnav') ) return; echo '\n"; } // Template tag: echoes semantic classes function sandbox_body_class() { global $wp_query; $c = array('wordpress'); sandbox_date_classes(time(), $c); is_home() ? $c[] = 'home' : null; is_page() ? $c[] = 'page' : null; is_archive() ? $c[] = 'archive' : null; is_date() ? $c[] = 'date' : null; is_search() ? $c[] = 'search' : null; is_paged() ? $c[] = 'paged' : null; is_attachment() ? $c[] = 'attachment' : null; is_404() ? $c[] = 'four04' : null; // CSS does not allow a digit as first character if ( is_author() ) { global $wp_query; $author = $wp_query->get_queried_object(); $c[] = 'author'; $c[] = 'author-' . $author->user_nicename; } if ( is_category() ) { global $wp_query; $cat = $wp_query->get_queried_object(); $c[] = 'category'; $c[] = 'category-' . $cat->category_nicename; } if ( is_single() ) { $c[] = 'single'; if ( isset($wp_query->post->post_date) ) sandbox_date_classes(mysql2date('U', $wp_query->post->post_date), $c, 's-'); } echo join(' ', apply_filters('body_class', $c)); } // Template tag: echoes semantic classes for a post function sandbox_post_class() { global $post, $sandbox_post_alt; $c = array('hentry', $post->post_type, $post->post_status); $c[] = 'author-' . get_the_author_login(); foreach ( (array) get_the_category() as $cat ) $c[] = 'category-' . $cat->category_nicename; sandbox_date_classes(mysql2date('U', $post->post_date), $c); if ( ++$sandbox_post_alt % 2 ) $c[] = 'alt'; echo join(' ', apply_filters('post_class', $c)); } $sandbox_post_alt = 1; // Template tag: echoes semantic classes for a comment function sandbox_comment_class() { global $comment, $post, $sandbox_comment_alt; $c = array($comment->comment_type); if ( $comment->user_id > 0 ) { $user = get_userdata($comment->user_id); $c[] = "byuser commentauthor-$user->user_login"; if ( $comment->user_id === $post->post_author ) $c[] = 'bypostauthor'; } sandbox_date_classes(mysql2date('U', $comment->comment_date), $c, 'c-'); if ( ++$sandbox_comment_alt % 2 ) $c[] = 'alt'; if ( is_trackback() ) { $c[] = 'trackback'; } echo join(' ', apply_filters('comment_class', $c)); } // Adds four time-based classes to an array function sandbox_date_classes($t, &$c, $p = '') { $t = $t + (get_settings('gmt_offset') * 3600); $c[] = $p . 'y' . gmdate('Y', $t); // Year $c[] = $p . 'm' . gmdate('m', $t); // Month $c[] = $p . 'd' . gmdate('d', $t); // Day $c[] = $p . 'h' . gmdate('h', $t); // Hour } function widget_sandbox_search($args) { extract($args); if ( empty($title) ) $title = __('Search', 'sandbox'); ?> '".__('Options saved successfully.', 'sandbox')."
documentation for help installing new skins and information on the rich semantic markup that makes the Sandbox unique.', 'sandbox'), get_template_directory_uri() . '/readme.html'); ?>