\n"; if(!empty($bgimage)) { $background_styles = 'background-image: url(\'' . get_theme_mod('background_image', '') . '\');' . ' background-repeat: ' . get_theme_mod('background_repeat', 'repeat') . ';' . ' background-position: top ' . get_theme_mod('background_position_x', 'left') . ';' . 'background-attachment: '. get_theme_mod('background_attachment', 'scroll'); echo "body { ".$background_styles."); } \n"; } if(!empty($bgcolor)) { echo "body { background-color: #".$bgcolor."; }; \n"; } if(empty($bgimage) && empty($bgcolor)) { echo "body { background: #e79233 url( " . get_template_directory_uri() . '/i/bg.png) repeat-x 0 0; }'." \n"; } echo ""; } } } else { $cbg = array( 'default-color' => 'E79233', 'default-image' => get_template_directory_uri() . '/i/bg.png' ); add_theme_support('custom-background', $cbg); } add_theme_support('post-formats', array( 'aside', 'link', 'gallery', 'status', 'quote', 'image' ) ); add_theme_support('automatic-feed-links'); add_theme_support('post-thumbnails'); add_editor_style(); if ( !isset( $content_width ) ) $content_width = 515; function ar_enqcommentreply() { if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script('comment-reply'); } } add_action('wp_enqueue_scripts', 'ar_enqcommentreply'); if (!function_exists('reg_nav_menus')) : function reg_nav_menus() { register_nav_menus ( array ( 'Main' => __('Main sidebar','ar'), 'Secondary' => __('Secondary sidebar','ar'), ) ); } endif; add_action('init','reg_nav_menus'); if(function_exists('register_sidebar')) register_sidebar(array( 'name' => __('Header main menu','ar'), 'description' => __('The main custom menu in the header of the site, usually used to show Pages.','ar'), 'before_title' => '', 'after_title' => '' )); if(function_exists('register_sidebar')) register_sidebar(array( 'name' => __('Footer first widget','ar'), 'description' => __('First widget section in the footer of the site.','ar'), 'before_title' => '
' . __( 'Continue ', 'ar' ) . '
'; } endif; if (!function_exists('ar_auto_excerpt')) : function ar_auto_excerpt($more) { return ' …' . ar_excerpt_link(); } endif; add_filter('excerpt_more', 'ar_auto_excerpt'); if ( !function_exists('ar_posted_on')) : function ar_posted_on() { printf( __('Posted on
', 'ar'), esc_url( get_permalink() ), esc_attr( get_the_time() ), esc_attr( get_the_date( ) ), esc_html( get_the_date() ), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_attr( sprintf( __( 'View all posts by %s', 'ar' ), get_the_author() ) ), get_the_author() ); } endif; if ( !function_exists('ar_filter_wp_title')) : function ar_filter_wp_title( $old_title, $sep, $sep_location ){ $ssep = ' ' . $sep . ' '; if( is_category() ) $insert = $ssep . 'Category'; elseif( is_tag() ) $insert = $ssep . 'Tag'; elseif( is_author() ) $insert = $ssep . 'Author'; elseif( is_year() || is_month() || is_day() ) $insert = $ssep . 'Archives'; else $insert = NULL; if( get_query_var( 'paged' ) ) $num = $ssep . 'page ' . get_query_var( 'paged' ); elseif( get_query_var( 'page' ) ) $num = $ssep . 'page ' . get_query_var( 'page' ); else $num = NULL; return get_bloginfo( 'name' ) . $insert . $old_title . $num; } endif; add_filter( 'wp_title', 'ar_filter_wp_title', 10, 3 );