• ') : $options['html_title_before']; $a = empty($options['html_title_after']) ? __('') : $options['html_title_after']; $title = empty($options['title']) ? __('Blogroll') : $options['title']; if (is_home()) { echo $before_widget; echo $before_title . $title . $after_title; echo ''; echo $after_widget; echo '
  • '; } } /*********************************************************************************/ /* pt-bookmarks widget control /*********************************************************************************/ function web_bookmarks_control() { $options = $newoptions = get_option('web_bookmarks'); if ( $_POST['bookmarks-submit'] ) { $newoptions['title'] = strip_tags(stripslashes($_POST['bookmarks-title'])); $newoptions['html_title_before'] = stripslashes($_POST['bookmarks-before']); $newoptions['html_title_after'] = stripslashes($_POST['bookmarks-after']); } if ( $options != $newoptions ) { $options = $newoptions; update_option('web_bookmarks', $options); } $title = wp_specialchars($options['title']); $html_title_before = wp_specialchars($options['html_title_before']); $html_title_after = $options['html_title_after']; ?>

  • '.pt_replacevideo($mediaid, $content).'

    '; echo $after_widget; } /*********************************************************************************/ /* wordTube widget control /*********************************************************************************/ function web_wordtube_control() { global $wpdb; $options = get_option('web_wordtube'); if ( !is_array($options) ) $options = array('title'=>'', 'mediaid'=>'0'); if ( $_POST['wordtube-submit'] ) { $options['title'] = strip_tags(stripslashes($_POST['wordtube-title'])); $options['mediaid'] = $_POST['wordtube-mediaid']; update_option('web_wordtube', $options); } $title = htmlspecialchars($options['title'], ENT_QUOTES); // The Box content echo '

    '; echo '

    '; echo '

    '; echo ''; } function kubrick_head() { $head = "\n"; if ( '' != $output ) echo $head . $output . $foot; } add_action('wp_head', 'kubrick_head'); function kubrick_header_image() { return apply_filters('kubrick_header_image', get_settings('kubrick_header_image')); } function kubrick_upper_color() { if ( strstr( $url = kubrick_header_image_url(), 'header-img.php?' ) ) { parse_str(substr($url, strpos($url, '?') + 1), $q); return $q['upper']; } else return '69aee7'; } function kubrick_lower_color() { if ( strstr( $url = kubrick_header_image_url(), 'header-img.php?' ) ) { parse_str(substr($url, strpos($url, '?') + 1), $q); return $q['lower']; } else return '4180b6'; } function kubrick_header_image_url() { if ( $image = kubrick_header_image() ) $url = get_template_directory_uri() . '/images/' . $image; else $url = get_template_directory_uri() . '/images/kubrickheader.jpg'; return $url; } function kubrick_header_color() { return apply_filters('kubrick_header_color', get_settings('kubrick_header_color')); } function kubrick_header_color_string() { $color = kubrick_header_color(); if ( false === $color ) return 'white'; return $color; } function kubrick_header_display() { return apply_filters('kubrick_header_display', get_settings('kubrick_header_display')); } function kubrick_header_display_string() { $display = kubrick_header_display(); return $display ? $display : 'inline'; } add_action('admin_menu', 'kubrick_add_theme_page'); function kubrick_add_theme_page() { if ( $_GET['page'] == basename(__FILE__) ) { if ( 'save' == $_REQUEST['action'] ) { if ( isset($_REQUEST['njform']) ) { if ( isset($_REQUEST['defaults']) ) { delete_option('kubrick_header_image'); delete_option('kubrick_header_color'); delete_option('kubrick_header_display'); } else { if ( '' == $_REQUEST['njfontcolor'] ) delete_option('kubrick_header_color'); else update_option('kubrick_header_color', $_REQUEST['njfontcolor']); if ( preg_match('/[0-9A-F]{6}|[0-9A-F]{3}/i', $_REQUEST['njuppercolor'], $uc) && preg_match('/[0-9A-F]{6}|[0-9A-F]{3}/i', $_REQUEST['njlowercolor'], $lc) ) { $uc = ( strlen($uc[0]) == 3 ) ? $uc[0]{0}.$uc[0]{0}.$uc[0]{1}.$uc[0]{1}.$uc[0]{2}.$uc[0]{2} : $uc[0]; $lc = ( strlen($lc[0]) == 3 ) ? $lc[0]{0}.$lc[0]{0}.$lc[0]{1}.$lc[0]{1}.$lc[0]{2}.$lc[0]{2} : $lc[0]; update_option('kubrick_header_image', "header-img.php?upper=$uc&lower=$lc"); } if ( isset($_REQUEST['toggledisplay']) ) { if ( false === get_settings('kubrick_header_display') ) update_option('kubrick_header_display', 'none'); else delete_option('kubrick_header_display'); } } } else { if ( isset($_REQUEST['headerimage']) ) { if ( '' == $_REQUEST['headerimage'] ) delete_option('kubrick_header_image'); else update_option('kubrick_header_image', $_REQUEST['headerimage']); } if ( isset($_REQUEST['fontcolor']) ) { if ( '' == $_REQUEST['fontcolor'] ) delete_option('kubrick_header_color'); else update_option('kubrick_header_color', $_REQUEST['fontcolor']); } if ( isset($_REQUEST['fontdisplay']) ) { if ( '' == $_REQUEST['fontdisplay'] || 'inline' == $_REQUEST['fontdisplay'] ) delete_option('kubrick_header_display'); else update_option('kubrick_header_display', 'none'); } } //print_r($_REQUEST); header("Location: themes.php?page=functions.php&saved=true"); die; } add_action('admin_head', 'kubrick_theme_page_head'); } add_theme_page('Customize Header', 'Header Image and Color', 'edit_themes', basename(__FILE__), 'kubrick_theme_page'); } function kubrick_theme_page_head() { ?>

    Options saved.

    '; ?>

    Header Image and Color


    Any CSS color (red or #FF0000 or rgb(255, 0, 0))
    HEX only (#FF0000 or #F00)
    HEX only (#FF0000 or #F00)