if ( function_exists('register_sidebar') ) register_sidebar(array('name'=>'Правая колонка', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '
', 'after_title' => '
', )); function register_my_menus() { register_nav_menus(array( 'header-menu' => 'header-menu1', 'left_menu'=>'left_menu1')); } if (function_exists('register_nav_menus')) { add_action( 'init', 'register_my_menus' ); } require_once (TEMPLATEPATH . '/functions/admin-menu.php'); if ( function_exists( 'add_theme_support' ) ) { add_theme_support( 'post-thumbnails' ); } function top_menu(){ $menu_name = 'header-menu'; $args = array( 'theme_location' => 'header-menu', 'menu' => '', 'container' => 'div', 'container_class' => 'css-menu-1', 'container_id' => '', 'menu_class' => 'css-menu-1', 'menu_id' => '', 'echo' => true, 'fallback_cb' => 'wp_page_menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'items_wrap' => '', 'depth' => 0 ); wp_nav_menu( $args ); /*$locations = get_nav_menu_locations(); $menu = wp_get_nav_menu_object( $locations[ $menu_name ] ); // получаем ID $menu_items = wp_get_nav_menu_items($menu->term_id); // получаем элементы по ID #var_Dump($menu_items); echo ""; */ } function right_menu(){ $menu_name = 'left_menu'; $args = array( 'theme_location' => 'left_menu', 'menu' => '', 'container' => 'div', 'container_class' => 'menu', 'container_id' => '', 'menu_class' => 'cssmenu', 'menu_id' => '', 'echo' => true, 'fallback_cb' => 'wp_page_menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'items_wrap' => '', 'depth' => 0 ); wp_nav_menu( $args ); } function custom_background(){ $category_id = wpsc_category_id(); #var_dump($category_id); $parent_category = get_ancestors( $category_id, "wpsc_product_category"); $categories = wp_get_object_terms( wpsc_the_product_id(), 'wpsc_product_category' ); echo ""; } function left_menu(){ echo "
"; $args = array( 'theme_location' => 'left_menu', 'container' => false, 'echo' => true, 'fallback_cb' => 'wp_page_menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'items_wrap' => '', 'depth' => 0 ); wp_nav_menu( $args ); echo "
"; /* echo " "; */ } function kama_breadcrumbs( $sep=' » ', $term=false, $taxonomies=false ){ global $post, $wp_query, $wp_post_types; // для локализации $l = array( 'home' => 'Главная' ,'paged' => 'Страница %s' ,'404' => 'Ошибка 404' ,'search' => 'Результаты поиска по зпросу - %s' ,'author' => 'Архив автора: %s' ,'year' => 'Архив за %s год' ,'month' => 'Архив за: %s' ,'day' => '' ,'attachment' => 'Медиа: %s' ,'tag' => 'Записи по метке: %s' ,'tax_tag' => '%s из "%s" по тегу: %s' ); $w1 = '
'; $w2 = '
'; $patt1 = ''; $sep .= ''; // закрываем span после разделителя! $patt = $patt1.'%s'; if( $paged = $wp_query->query_vars['paged'] ){ $pg_patt = $patt1; $pg_end = ''. $sep . sprintf($l['paged'], $paged); } if( is_front_page() ) return print $w1.($paged?sprintf($pg_patt, get_bloginfo('url')):'') . $l['home'] . $pg_end .$w2; elseif( is_404() ) $out = $l['404']; elseif( is_search() ){ $s = preg_replace('@alert("запрос не верный!"); ', $GLOBALS['s']); $out = sprintf($l['search'], $s); } elseif( is_author() ){ $q_obj = &$wp_query->queried_object; $out = ($paged?sprintf( $pg_patt, get_author_posts_url($q_obj->ID, $q_obj->user_nicename) ):'') . sprintf($l['author'], $q_obj->display_name) . $pg_end; } elseif( is_year() || is_month() || is_day() ){ $y_url = get_year_link( $year=get_the_time('Y') ); $m_url = get_month_link( $year, get_the_time('m') ); $y_link = sprintf($patt, $y_url, $year); $m_link = sprintf($patt, $m_url, get_the_time('F')); if( is_year() ) $out = ($paged?sprintf($pg_patt, $y_url):'') . sprintf($l['year'], $year) . $pg_end; elseif( is_month() ) $out = $y_link . $sep . ($paged?sprintf($pg_patt, $m_url):'') . sprintf($l['month'], get_the_time('F')) . $pg_end; elseif( is_day() ) $out = $y_link . $sep . $m_link . $sep . get_the_time('l'); } // Страницы и древовидные типы записей elseif( $wp_post_types[$post->post_type]->hierarchical ){ $parent = $post->post_parent; $crumbs=array(); while($parent){ $page = &get_post($parent); $crumbs[] = sprintf($patt, get_permalink($page->ID), $page->post_title); $parent = $page->post_parent; } $crumbs = array_reverse($crumbs); foreach ($crumbs as $crumb) $out .= $crumb.$sep; $out = $out . $post->post_title; } else // Таксономии, вложения и не древовидные типы записей { // Определяем термины if(!$term){ if( is_singular() ){ if( !$taxonomies ){ $taxonomies = get_taxonomies( array('hierarchical'=>true, 'public'=>true) ); if( count($taxonomies)==1 ) $taxonomies = 'category'; } if( $term = get_the_terms( $post->post_parent?$post->post_parent:$post->ID, $taxonomies ) ) $term = array_shift($term); } else $term = &$wp_query->get_queried_object(); } if( !$term && !is_attachment() ) return print "Error: Taxonomy isn`t defined!"; $pg_term_start = ($paged && $term->term_id) ? sprintf( $pg_patt, get_term_link( (int)$term->term_id, $term->taxonomy ) ) : ''; if( is_attachment() ){ if(!$post->post_parent) $out = sprintf($l['attachment'], $post->post_title); else $out = crumbs_tax($term->term_id, $term->taxonomy, $sep, $patt) . sprintf($patt, get_permalink($post->post_parent), get_the_title($post->post_parent) ).$sep.$post->post_title; } elseif( is_single() ) $out = crumbs_tax($term->parent, $term->taxonomy, $sep, $patt) . sprintf($patt, get_term_link( (int)$term->term_id, $term->taxonomy ), $term->name). $sep.$post->post_title; // Метки, архивная страница типа записи, произвольные одноуровневые таксономии elseif( !is_taxonomy_hierarchical($term->taxonomy) ){ // метка if( is_tag() ) $out = $pg_term_start . sprintf($l['tag'], $term->name) . $pg_end; // архивная страница произвольного типа записи elseif( !$term->term_id ) $home_after = sprintf($patt, '/?post_type='. $term->name, $term->label). $pg_end; // таксономия else { $post_label = $wp_post_types[$post->post_type]->labels->name; $tax_label = $GLOBALS['wp_taxonomies'][$term->taxonomy]->labels->name; $out = $pg_term_start . sprintf($l['tax_tag'], $post_label, $tax_label, $term->name) . $pg_end; } }// Рубрики и таксономии else $out = crumbs_tax($term->parent, $term->taxonomy, $sep, $patt) . $pg_term_start . $term->name . $pg_end; } // ссылка на архивную страницу произвольно типа поста if( !empty($post->post_type) && $post->post_type!='post' && !is_page() && !is_attachment() && !$home_after ) $home_after = sprintf($patt, '/?post_type='. $post->post_type, $wp_post_types[$post->post_type]->labels->name ). $sep; $home = sprintf($patt, get_bloginfo('url'), $l['home'] ). $sep . $home_after; return print $w1. $home . $out .$w2; } function crumbs_tax($term_id, $tax, $sep, $patt){ $termlink = array(); while( (int)$term_id ){ $term2 = &get_term( $term_id, $tax ); $termlink[] = sprintf($patt, get_term_link( (int)$term2->term_id, $term2->taxonomy ), $term2->name). $sep; $term_id = (int)$term2->parent; } $termlinks = array_reverse($termlink); return implode('', $termlinks); } ?> get_header(); ?>

Фотогалерея

Наша техника на съемках рекламы:

 
 

Переносим деревья на объекте у заказчика, не разрушая корни:

Погрузка самосвала отработанным грунтом:

Уборка снега: