Skip to content
Browse files

Changed default nav layout to square. Changed fallback menu layout to…

… square. Cleaned up options panel sidebar styling. Removed dashboard/ login links from nav menu and moved to footer.
  • Loading branch information...
1 parent e3bd661 commit 23803e1ea6249031dd92e386cb31574bcf3f553c @jeremyclark13 committed
Showing with 1,074 additions and 1,101 deletions.
  1. +23 −4 functions.php
  2. +10 −10 functions/tech-css.php
  3. +1 −1 header.php
  4. +2 −2 inc/css/optionsframework.css
  5. +0 −53 nav-wp3.php
  6. +19 −0 nav.php
  7. +3 −11 options.php
  8. +1,016 −1,020 style.css
View
27 functions.php
@@ -721,7 +721,7 @@ function tech_comment_count( $count ) {
}
/**
- * Techozoic WP 3 menu fallback
+ * Techozoic WP menu fallback
*
* Callback for use in wp_nav_menu when no menu is assigned.
*
@@ -740,6 +740,25 @@ function tech_menu_fallback() {
}
/**
+ * Techozoic WP menu fallback
+ *
+ * filter to add css class to wp_list_pages function for styling fallback menu
+ * child menus
+ *
+ *
+ * @access private
+ * @since 2.0.9
+ */
+
+function tech_add_menu_parent_class( $css_class, $page, $depth, $args )
+{
+ if ( ! empty( $args['has_children'] ) )
+ $css_class[] = 'has_children';
+ return $css_class;
+}
+add_filter( 'page_css_class', 'tech_add_menu_parent_class', 10, 4 );
+
+/**
* Techozoic Font Resize Script
*
* Enqueues and register font resize script used for Techozoic font resize widget.
@@ -806,9 +825,9 @@ function tech_footer_text() {
$theme_data = get_theme_data( get_template_directory() . '/style.css' );
$version = $theme_data['Version'];
}
- $string = of_get_option( 'footer_text', '%COPYRIGHT% %BLOGNAME% | %THEMENAME% %THEMEVER% by %THEMEAUTHOR%. | %TOP% <br /> <small>%MYSQL%</small>' );
- $shortcode = array( '/%BLOGNAME%/i', '/%THEMENAME%/i', '/%THEMEVER%/i', '/%THEMEAUTHOR%/i', '/%TOP%/i', '/%COPYRIGHT%/i', '/%MYSQL%/i' );
- $output = array( get_bloginfo( 'name' ), "Techozoic", $version, '<a href="http://clark-technet.com/"> Jeremy Clark</a>', '<a href="#top">' . __( 'Top', 'techozoic' ) . '</a>', '&copy; ' . date( 'Y' ), sprintf( __( '%1$d mySQL queries in %2$s seconds.', 'techozoic' ), get_num_queries(), timer_stop( 0 ) ) );
+ $string = of_get_option( 'footer_text', '%COPYRIGHT% %BLOGNAME% | %THEMENAME% %THEMEVER% by %THEMEAUTHOR%. | %TOP% | %LOGIN% <br /> <small>%MYSQL%</small>' );
+ $shortcode = array( '/%BLOGNAME%/i', '/%THEMENAME%/i', '/%THEMEVER%/i', '/%THEMEAUTHOR%/i', '/%TOP%/i', '/%COPYRIGHT%/i', '/%MYSQL%/i', '/%LOGIN%/i' );
+ $output = array( get_bloginfo( 'name' ), "Techozoic", $version, '<a href="http://clark-technet.com/"> Jeremy Clark</a>', '<a href="#top">' . __( 'Top', 'techozoic' ) . '</a>', '&copy; ' . date( 'Y' ), sprintf( __( '%1$d mySQL queries in %2$s seconds.', 'techozoic' ), get_num_queries(), timer_stop( 0 ) ), wp_loginout(get_permalink(), false) );
echo preg_replace( $shortcode, $output, $string );
}
View
20 functions/tech-css.php
@@ -241,20 +241,20 @@ function tech_head_css() {
ul#admin li a:hover, ul#dropdown li a:hover, #navmenu .top-menu li a:hover{
color: {$tech_nav_hov_text_color};
}
-ul#dropdown > li, ul.top-menu > li{
+#dropdown > li, ul.top-menu > li{
margin: 0 {$tech_nav_margin}px;
}
-.ribbon ul.top-menu > li, .square ul.top-menu > li{
+.ribbon ul.top-menu > li, .square ul.top-menu > li, #dropdown > li{
margin: 0;
padding: 0 {$tech_nav_margin}px;
}
-.ribbon ul.top-menu > li.has_children:hover:after, .square ul.top-menu > li.has_children:hover:after {
+.ribbon ul.top-menu > li.has_children:hover:after, .square ul.top-menu > li.has_children:hover:after, #dropdown > li.has_children:hover:after {
border-bottom: 5px solid {$tech_nav_ul_bg_color};
}
#dropdown ul, .top-menu ul{
background-color: {$tech_nav_bg_gradient_top};
}
-.ribbon, .square{
+.ribbon, .square, #dropdown{
background-color: {$tech_nav_bg_gradient_top};
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from({$tech_nav_bg_gradient_top}), to({$tech_nav_bg_gradient_bot}));
background-image: -webkit-linear-gradient(top, {$tech_nav_bg_gradient_top}, {$tech_nav_bg_gradient_bot});
@@ -273,26 +273,26 @@ function tech_head_css() {
CSS;
if ( of_get_option( 'search_box', '1' ) == '1' ) {
$css_var .= <<<CSS
-.ribbon ul.top-menu > li:last-child, .square ul.top-menu > li:last-child{
+.ribbon ul.top-menu > li:last-child, .square ul.top-menu > li:last-child, #dropdown > li:last-child{
margin-right: 100px;
}
CSS;
}
if ( $tech_nav_bg_trans != '1' ) {
$css_var .= <<<CSS
-#navmenu .top-menu li, #navmenu .top-menu ul.sub-menu, ul#admin li{
+#navmenu .top-menu li, #navmenu .top-menu ul.sub-menu, ul#admin li, #navmenu #dropdown li{
background-color: {$tech_nav_ul_bg_color};
}
-#dropdown li.current_page_item, #navmenu .top-menu li.current-menu-item, #navmenu .top-menu ul.sub-menu li.current-menu-item {
+#navmenu #dropdown li.current_page_item, #navmenu .top-menu li.current-menu-item, #navmenu .top-menu ul.sub-menu li.current-menu-item {
background-color: {$tech_nav_active_bg_color} ;
}
-#dropdown li:hover, #navmenu .top-menu li:hover, #navmenu .top-menu ul.sub-menu > li:hover {
+#navmenu #dropdown li:hover, #navmenu .top-menu li:hover, #navmenu .top-menu ul.sub-menu > li:hover {
background-color:{$tech_nav_hov_bg_color};
}
-#dropdown li.current_page_item > a:hover, #navmenu .top-menu li.current-menu-item > a:hover, #navmenu .top-menu li.current-menu-item:hover > a, #navmenu .top-menu li:hover > a {
+#navmenu #dropdown li.current_page_item > a:hover, #navmenu .top-menu li.current-menu-item > a:hover, #navmenu .top-menu li.current-menu-item:hover > a, #navmenu .top-menu li:hover > a, #navmenu #dropdown li:hover > a {
color:{$tech_nav_hov_text_color};
}
-#dropdown li.current_page_item > a, #navmenu .top-menu li.current-menu-item > a{
+#navmenu #dropdown li.current_page_item > a, #navmenu .top-menu li.current-menu-item > a{
color:{$tech_nav_active_text_color};
}
ul#admin li:hover{
View
2 header.php
@@ -128,6 +128,6 @@
<?php
if ( of_get_option( 'nav_location', 'below' ) == 'below' ) {
- get_template_part( 'nav', 'wp3' );
+ get_template_part( 'nav' );
}
?>
View
4 inc/css/optionsframework.css
@@ -43,11 +43,11 @@
#optionsframework .section .controls {
float: left;
min-width:350px;
- width: 54%;
+ width: 65%;
padding-right:2%;
}
#optionsframework .section .explain {
- max-width:38%;
+ max-width:33%;
float: left;
font-size: 12px;
line-height:16px;
View
53 nav-wp3.php
@@ -1,53 +0,0 @@
-<?php
-global $tech_nav;
-if ( ($tech_nav == "on") && (of_get_option( 'nav_menu', '1' ) == '1') ) {
- ?>
- <div id="navmenu" class="<?php echo of_get_option( 'nav_type', 'square' ); ?> <?php echo of_get_option( 'nav_type', 'square' ); ?>-<?php echo of_get_option( 'nav_location', 'below' ); ?>">
- <div id="navwrap">
- <?php
- wp_nav_menu( array( 'container' => '', 'theme_location' => 'primary', 'menu_class' => 'top-menu', 'fallback_cb' => 'tech_menu_fallback', 'walker' => new techozoic_menu_walker() ) );
- if ( of_get_option( 'search_box', '1' ) == '1' ) {
- get_search_form();
- }
- ?>
- </div>
- <?php
- if ( $tech_nav == "on" ) {
- if ( of_get_option( 'dashboard_link', '1' ) == "1" ) {
- if ( is_user_logged_in() ) {
- ?>
- <ul id="admin"><li><a href="<?php echo site_url(); ?>/wp-admin" title="<?php _e( 'Dashboard', 'techozoic' ) ?>"><?php _e( 'Dashboard', 'techozoic' ) ?></a></li>
- <li><a href="<?php echo wp_logout_url(); ?>" title="<?php _e( 'Log Out', 'techozoic' ) ?>"><?php _e( 'Log Out', 'techozoic' ) ?></a></li></ul>
- <?php } else {
- ?>
- <ul id="admin"><li>
- <?php if ( of_get_option( 'thickbox', '0' ) == '1' ) {
- ?>
- <a href="#TB_inline?height=120&amp;width=120&amp;inlineId=loginthick" class="thickbox" title="Login"><?php _e( 'Login', 'techozoic' ) ?></a>
- <?php } else {
- ?> <a href="<?php echo wp_login_url(); ?>" title="<?php _e( 'Login', 'techozoic' ) ?>"><?php _e( 'Login', 'techozoic' ) ?></a>
- <?php }
- ?>
- </li></ul>
- <div id="loginthick" style="display:none">
- <div class="aligncenter">
- <form action="<?php echo site_url(); ?>/wp-login.php" method="post" id="loginform">
- <label><?php _e( 'Username: ', 'techozoic' ) ?><br /><input type="text" id="user_login" class="text" name="log"/></label><br />
- <label><?php _e( 'Password: ', 'techozoic' ) ?><br /><input type="password" id="user_pass" class="text" name="pwd"/></label><br />
- <input type="submit" id="wp-submit" value="<?php _e( 'Log in', 'techozoic' ) ?>" />
- <input type="hidden" name="redirect_to" value="<?php echo "http://" . $_SERVER["SERVER_NAME"] . $_SERVER['REQUEST_URI']; ?>" />
- <input type="hidden" name="testcookie" value="1" />
- </form>
- </div><!--end aligncenter-->
- </div><!--end loginthick-->
- <?php
- }
- }
- ?>
- </div><!--end navmenu-->
- <?php
- }
-}
-if ( of_get_option( 'breadcrumbs', '0' ) == '1' ) {
- tech_breadcrumbs();
-}
View
19 nav.php
@@ -0,0 +1,19 @@
+<?php
+global $tech_nav;
+if ( ($tech_nav == "on") && (of_get_option( 'nav_menu', '1' ) == '1') ) {
+ ?>
+ <div id="navmenu" class="<?php echo of_get_option( 'nav_type', 'square' ); ?> <?php echo of_get_option( 'nav_type', 'square' ); ?>-<?php echo of_get_option( 'nav_location', 'below' ); ?>">
+ <div id="navwrap">
+ <?php
+ wp_nav_menu( array( 'container' => '', 'theme_location' => 'primary', 'menu_class' => 'top-menu', 'fallback_cb' => 'tech_menu_fallback', 'walker' => new techozoic_menu_walker() ) );
+ if ( of_get_option( 'search_box', '1' ) == '1' ) {
+ get_search_form();
+ }
+ ?>
+ </div><!--end navwrap-->
+ </div><!--end navmenu-->
+ <?php
+}
+if ( of_get_option( 'breadcrumbs', '0' ) == '1' ) {
+ tech_breadcrumbs();
+}
View
14 options.php
@@ -172,10 +172,10 @@ function optionsframework_options() {
"std" => "3" );
$options[] = array( "name" => __( 'Custom Footer Text', 'techozoic' ),
- "desc" => __( 'Text displayed in footer - HTML allowed. <br />Shortcodes that can be used: <br />%BLOGNAME% -> The blog\'s title. <br />%THEMENAME% -> Theme name.<br /> %THEMEVER% -> Current Theme Version.<br /> %THEMEAUTHOR% -> Link to Theme Author\'s website.*<br />%TOP% -> Link to the Top of the page.<br /> %COPYRIGHT% -> Insert copyright info for current year.<br /> %MYSQL% -> MySQL queries and processing time info<br /><br />*It is completely optional, but if you like Techozoic I would appreciate it if you keep the credit link.', 'techozoic' ),
+ "desc" => __( 'Text displayed in footer - HTML allowed. <br />Shortcodes that can be used: <br />%BLOGNAME% -> The blog\'s title. <br />%THEMENAME% -> Theme name.<br /> %THEMEVER% -> Current Theme Version.<br /> %THEMEAUTHOR% -> Link to Theme Author\'s website.*<br />%TOP% -> Link to the Top of the page.<br /> %COPYRIGHT% -> Insert copyright info for current year.<br /> %LOGIN% -> Displays link to login form or logout link depending on user status.<br /> %MYSQL% -> MySQL queries and processing time info<br /><br />*It is completely optional, but if you like Techozoic I would appreciate it if you keep the credit link.', 'techozoic' ),
"id" => "footer_text",
"old_options" => '',
- "std" => "%COPYRIGHT% %BLOGNAME% | %THEMENAME% %THEMEVER% by %THEMEAUTHOR%. | %TOP% <br /> <small>%MYSQL%</small>",
+ "std" => "%COPYRIGHT% %BLOGNAME% | %THEMENAME% %THEMEVER% by %THEMEAUTHOR%. | %TOP% | %LOGIN% <br /> <small>%MYSQL%</small>",
"type" => "textarea" );
$options[] = array( "name" => __( 'Drop Shadow Boxes', 'techozoic' ),
@@ -246,17 +246,9 @@ function optionsframework_options() {
"id" => "nav_type",
"type" => "radio",
"class" => "hidden",
- "std" => "standard",
+ "std" => "square",
"options" => array( 'standard' => __( 'Tabs', 'techozoic' ), 'ribbon' => __( 'Ribbon - Can only be left aligned', 'techozoic' ), 'square' => __( 'Square - Can only be left aligned', 'techozoic' ) ) );
- $options[] = array( "name" => __( 'Log In/Out Links', 'techozoic' ),
- "desc" => __( 'Enable Dashboard and Log in/out links.', 'techozoic' ),
- "id" => "dashboard_link",
- "class" => "hidden",
- "type" => "checkbox",
- "old_options" => array( "On" => "1", "Off" => "0" ),
- "std" => "1" );
-
$options[] = array( "name" => __( 'Breadcrumbs', 'techozoic' ),
"desc" => __( 'Enable Breadcrumb navigation. Useful with Sidebar Nav Widget.', 'techozoic' ),
"id" => "breadcrumbs",
View
2,036 style.css
1,016 additions, 1,020 deletions not shown because the diff is too large. Please use a local Git client to view these changes.

0 comments on commit 23803e1

Please sign in to comment.
Something went wrong with that request. Please try again.