Permalink
Browse files

Hello World

  • Loading branch information...
Mamaduka committed Apr 19, 2012
0 parents commit c2dd3fa521550e44c1bc178ac4b593f52cc668c7
Showing with 461 additions and 0 deletions.
  1. BIN favico.ico
  2. +13 −0 footer.php
  3. +143 −0 functions.php
  4. +94 −0 header.php
  5. +14 −0 includes/theme_options.css
  6. +12 −0 includes/theme_options.js
  7. +1 −0 includes/theme_options.php
  8. +5 −0 index.php
  9. +5 −0 page.php
  10. BIN screenshot.png
  11. +73 −0 sidebar.php
  12. +1 −0 single.php
  13. +99 −0 style.css
  14. +1 −0 tmpl_single.php
Binary file not shown.
@@ -0,0 +1,13 @@
+ </div>
+ <!-- /Content of the site -->
+
+ </div>
+ <!-- /Inner of the site -->
+
+ </div>
+ <!-- /Wrapper of the site -->
+ <?php wp_footer(); ?>
+ <?php echo ($strTmp = get_option('free01_google_analytics', '')) ? $strTmp : '' ?>
+ </body>
+</html>
+
@@ -0,0 +1,143 @@
+<?php
+/***** Theme setup *****/
+
+load_theme_textdomain('free01', get_template_directory() . '/languages');
+add_theme_support( 'post-thumbnails' );
+add_theme_support( 'automatic-feed-links' );
+
+/**
+ * Add Home page to the menu handling
+ */
+function free01_home_page_menu_args( $args ) {
+ $args['show_home'] = true;
+ return $args;
+}
+add_filter( 'wp_page_menu_args', 'free01_home_page_menu_args' );
+
+function free01_remove_submenus() {
+ global $submenu;
+ remove_submenu_page( 'themes.php', 'widgets.php' );
+}
+add_action('admin_menu', 'free01_remove_submenus');
+
+function free01_setup() {
+
+ /***** Navigation & Menu *****/
+ $menus = array(
+ __('Main menu', 'free01') => __('Main menu', 'free01'),
+ );
+ foreach ( $menus as $key=>$value ) {
+ if ( !is_nav_menu( $key ) ) wp_update_nav_menu_item( wp_create_nav_menu( $key ), 1 );
+ }
+
+ if ( function_exists( 'register_nav_menus' ) ) {
+ register_nav_menus($menus);
+ }
+
+ remove_action('wp_head', '_admin_bar_bump_cb');
+}
+add_action( 'init', 'free01_setup' );
+
+/**
+ * Add items to the admin bar
+ */
+function free01_admin_bar() {
+ global $wp_admin_bar;
+ if ( !is_super_admin() || !is_admin_bar_showing() )
+ return;
+
+ $wp_admin_bar->add_menu( array( 'id' => 'wpshower_admin', 'title' => __( 'Expositio Theme', 'free01' ), 'href' => FALSE ) );
+ $wp_admin_bar->add_menu( array( 'parent' => 'wpshower_admin', 'title' => __( 'Support Forum', 'free01' ), 'href' => 'http://wpshower.com/forums' ) );
+ $wp_admin_bar->add_menu( array( 'parent' => 'wpshower_admin', 'title' => __( 'Theme Options', 'free01' ), 'href' => site_url().'/wp-admin/themes.php?page=theme_options.php' ) );
+
+
+}
+add_action( 'admin_bar_menu', 'free01_admin_bar', 1000 );
+
+/**
+ *
+ */
+function free01_get_comments_link($post_id ) {
+
+ if (!$post_id) return null;
+ $strResult = '';
+ $zero = __( 'No Comments', 'free01' );
+ $one = __( '1 Comment', 'free01' );
+ $more = __( '%d Comments', 'free01' );
+
+ $obj_count_comments = wp_count_comments( $post_id );
+ $numTmp = $obj_count_comments->approved;
+ $strResult .= '<a href="'.get_permalink($post_id) . '#respond'.'" title="'.__('Post comment for this entry', 'free01').'">';
+ if ($numTmp > 1) $strResult .= sprintf($more, $numTmp);
+ else if ($numTmp == 1) $strResult .= $one;
+ else $strResult .= $zero;
+ $strResult .= '</a>';
+ return $strResult;
+}
+
+/**
+ *
+ */
+function free01_get_intro($strText, $numTmp = 200, $strMore='') {
+ $strTmp = $strText;
+ $arrTmp = preg_split('/<!--more-->/', $strTmp);
+ $strIntro = strip_tags($arrTmp[0]);
+ if ($numTmp == 0)
+ {
+ return $strIntro;
+ }
+ else if (strlen($strIntro) > $numTmp)
+ {
+ $strIntro = @strpos($strIntro, ' ', $numTmp) ? substr($strIntro, 0, strpos($strIntro, ' ', $numTmp)) : $strIntro;
+ return $strIntro.$strMore;
+ }
+ else
+ {
+ return $strIntro;
+ }
+ }
+
+class extended_walker extends Walker_Nav_Menu{
+ function display_element( $element, &$children_elements, $max_depth, $depth=0, $args, &$output ) {
+ if ( !$element )
+ return;
+
+ $id_field = $this->db_fields['id'];
+
+ if ( is_array( $args[0] ) )
+ $args[0]['has_children'] = ! empty( $children_elements[$element->$id_field] );
+
+ if( ! empty( $children_elements[$element->$id_field] ) )
+ array_push($element->classes,'parent');
+
+ $cb_args = array_merge( array(&$output, $element, $depth), $args);
+
+ call_user_func_array(array(&$this, 'start_el'), $cb_args);
+
+ $id = $element->$id_field;
+
+ if ( ($max_depth == 0 || $max_depth > $depth+1 ) && isset( $children_elements[$id]) ) {
+
+ foreach( $children_elements[ $id ] as $child ){
+
+ if ( !isset($newlevel) ) {
+ $newlevel = true;
+ $cb_args = array_merge( array(&$output, $depth), $args);
+ call_user_func_array(array(&$this, 'start_lvl'), $cb_args);
+ }
+ $this->display_element( $child, $children_elements, $max_depth, $depth + 1, $args, $output );
+ }
+ unset( $children_elements[ $id ] );
+ }
+
+ if ( isset($newlevel) && $newlevel ){
+ $cb_args = array_merge( array(&$output, $depth), $args);
+ call_user_func_array(array(&$this, 'end_lvl'), $cb_args);
+ }
+
+ $cb_args = array_merge( array(&$output, $element, $depth), $args);
+ call_user_func_array(array(&$this, 'end_el'), $cb_args);
+ }
+}
+
+require_once (TEMPLATEPATH . '/includes/theme_options.php');
@@ -0,0 +1,94 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php bloginfo('text_direction'); ?>" xml:lang="<?php bloginfo('language'); ?>">
+ <head>
+ <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
+ <title>
+ <?php
+ global $page, $paged;
+ wp_title( '|', true, 'right' );
+ bloginfo( 'name' );
+ $site_description = get_bloginfo( 'description', 'display' );
+ if ( $site_description && ( is_home() || is_front_page() ) ) echo " | $site_description";
+ if ( $paged >= 2 || $page >= 2 ) echo ' | ' . sprintf( __( 'Page %s' ), max( $paged, $page ) );
+ ?>
+ </title>
+ <link rel="profile" href="http://gmpg.org/xfn/11" />
+ <?php
+ if ( get_option('free01_favicon_url') )
+ echo '<link rel="shortcut icon" href="' . get_option('free01_favicon_url') . '" type="image/x-icon" />';
+ else
+ echo '<link rel="shortcut icon" type="image/ico" href="'.get_bloginfo( 'template_url' ).'/favico.ico" />';
+ ?>
+
+ <link rel="stylesheet" href="<?php bloginfo( 'stylesheet_url' ); ?>" type="text/css" media="all" />
+ <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
+ <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>"/>
+ <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
+
+ <?php
+ wp_enqueue_script( 'jquery' );
+
+ if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' );
+ wp_head();
+ ?>
+ <?php
+ $numTmpFontSize = (int)(get_option('free01_font_size', 14));
+ if ($numTmpFontSize < 12) $numTmpFontSize = 12;
+
+ $strFontFamily = get_option('free01_font_family', 'Helvetica');
+ if ($strFontFamily == 'Droid Sans Mono')
+ {
+ echo '<link href="http://fonts.googleapis.com/css?family=Droid+Sans+Mono&amp;v1" rel="stylesheet" type="text/css" />';
+ $strFontFamily = '"Droid Sans Mono", Sans-Serif';
+ }
+ if ($strFontFamily == 'Arvo')
+ {
+ echo '<link href="http://fonts.googleapis.com/css?family=Arvo&amp;v1" rel="stylesheet" type="text/css" />';
+ $strFontFamily = '"Arvo", Sans-Serif';
+ }
+ if ($strFontFamily == 'Bentham')
+ {
+ echo '<link href="http://fonts.googleapis.com/css?family=Bentham&amp;v1" rel="stylesheet" type="text/css" />';
+ $strFontFamily = '"Bentham", Sans-Serif';
+ }
+ if ($strFontFamily == 'Helvetica')
+ {
+ $strFontFamily = 'Helvetica, Arial, Sans-Serif';
+ }
+ if ($strFontFamily == 'Georgia')
+ {
+ $strFontFamily = 'Georgia, Times, Times New Roman, Serif';
+ }
+ if ($strFontFamily == 'Arial')
+ {
+ $strFontFamily = 'Arial, Sans-Serif';
+ }
+
+ $strTextColor = get_option('free01_text_color', '#000');
+ $strLinkColor = get_option('free01_link_color', '#000');
+ $strBgColor = get_option('free01_bg_color', '#fff');
+ ?>
+ <style media="all" type="text/css">
+ body, h1, h2, h3, h4, h5 { font-size: <?php echo $numTmpFontSize.'px' ?>;}
+ body { font-family: <?php echo $strFontFamily ?>;}
+ body { color: <?php echo $strTextColor ?>;}
+ a, a:hover { color: <?php echo $strLinkColor ?>;}
+ body, #wps-sidebar { background-color: <?php echo $strBgColor ?>;}
+
+ </style>
+ </head>
+ <body <?php body_class(); ?>>
+ <!--[if gt IE 8]> <div id="wps-site-wrapper" class="wpscls-ie wpscls-ie9"> <![endif]-->
+ <!--[if IE 8]> <div id="wps-site-wrapper" class="wpscls-ie wpscls-ie8"> <![endif]-->
+ <!--[if IE 7]> <div id="wps-site-wrapper" class="wpscls-ie wpscls-ie7"> <![endif]-->
+ <!--[if IE 6]> <div id="wps-site-wrapper" class="wpscls-ie wpscls-ie6"> <![endif]-->
+ <!--[if !IE]><!--> <div id="wps-site-wrapper"> <!--<![endif]-->
+
+ <!-- Inner of the site -->
+ <div id="wps-site-inner">
+
+ <?php get_sidebar(); ?>
+
+ <!-- Content of the site -->
+ <div id="wps-content">
+
@@ -0,0 +1,14 @@
+.free01 .inside h3 {background: none; border-radius: 0; -moz-border-radius: 0; -webkit-border-radius: 0; cursor: default; border-top: 1px solid #DFDFDF; padding-top: 15px !important; margin-top: 10px !important;}
+.free01 .inside h3.first {border-top: none; margin-top: 0 !important;}
+.free01 .hndle {cursor: default;}
+.free01 .form-table td input, .free01 .form-table td .description {vertical-align: middle;}
+.free01 .form-table td .description {margin-left: 5px;}
+.free01_options {padding: 40px 20px;}
+.getconnected-item {margin-bottom: 5px;}
+.getconnected-options {display: none;}
+.getconnected-title {font-size: 13px; display: block; margin-bottom: 5px;}
+
+#mColorPickerImg { background-image: url("../images/colorpicker.png") !important;}
+#mColorPickerImgGray { background-image: url("../images/gray.png") !important;}
+#colorpicker_text_color, #colorpicker_link_color, #colorpicker_bg_color { display: none;}
+#colorpicker_text_color_link, #colorpicker_link_color_link, #colorpicker_bg_color_link { margin-left: 8px;}
@@ -0,0 +1,12 @@
+jQuery(document).ready(function() {
+ jQuery('.getconnected-options').hide();
+ jQuery('.wrap').delegate('.getconnected-title', 'click',
+ function(){
+ jQuery(this).next().slideToggle(100);
+ }
+ );
+
+ jQuery('.postbox').children('h3, .handlediv').click(function(){
+ jQuery(this).siblings('.inside').toggle();
+ });
+});
Oops, something went wrong.

0 comments on commit c2dd3fa

Please sign in to comment.