__( 'Primary Navigation', 'ari'), ) ); } endif; /* Calls jQuery and SmoothScroll im Footer */ function ari_smoothscroll_init() { if ( !is_admin() ) { wp_deregister_script( 'jquery' ); wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js', false, '1.4.2', true ); wp_enqueue_script( 'jquery' ); wp_enqueue_script( 'smoothscroll', get_template_directory_uri() . '/js/smoothscroll.js', array( 'jquery'), '1.0', true ); } } // works also for WP < version 3.0 global $wp_version; if ( version_compare($wp_version, "3.0alpha", "<") ) { add_action( 'init', 'ari_smoothscroll_init' ); } else { add_action( 'after_setup_theme', 'ari_smoothscroll_init' ); } /* Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link. */ function ari_page_menu_args( $args ) { $args['show_home'] = true; return $args; } add_filter( 'wp_page_menu_args', 'ari_page_menu_args' ); /* Sets the post excerpt length to 40 characters. */ function ari_excerpt_length( $length ) { return 40; } add_filter( 'excerpt_length', 'ari_excerpt_length' ); /* Returns a "Continue Reading" link for excerpts */ function ari_continue_reading_link() { return ' ' . __( 'Continue reading ', 'ari' ) . ''; } /* Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and ari_continue_reading_link(). */ function ari_auto_excerpt_more( $more ) { return ' …' . ari_continue_reading_link(); } add_filter( 'excerpt_more', 'ari_auto_excerpt_more' ); /* Adds a pretty "Continue Reading" link to custom post excerpts. */ function ari_custom_excerpt_more( $output ) { if ( has_excerpt() && ! is_attachment() ) { $output .= ari_continue_reading_link(); } return $output; } add_filter( 'get_the_excerpt', 'ari_custom_excerpt_more' ); if ( ! function_exists( 'ari_comment' ) ) : /* Search form custom styling */ function ari_search_form( $form ) { $form = ''; return $form; } add_filter( 'get_search_form', 'ari_search_form' ); /* Template for comments and pingbacks. */ function ari_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case '' : ?>
  • id="li-comment-">
    comment_approved == '0' ) : ?>

    $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
  • ' . '

    '; $fields['email'] = '

    ' . ( $req ? '*' : '' ) . '

    '; $fields['author'] = '

    ' . ' ' . ( $req ? '*' : '') . '

    '; return $fields; } add_filter('comment_form_default_fields','ari_fields'); /* Register widgetized areas, including two sidebars and four widget-ready columns in the footer. */ function ari_widgets_init() { // Primary Widget area (left, fixed sidebar) register_sidebar( array( 'name' => __( 'Primary Widget Area', 'ari' ), 'id' => 'primary-widget-area', 'description' => __( 'Here you can put one or two of your main widgets (like an intro text, your page navigation or some social site links) in your left sidebar. The sidebar is fixed, so the widgets content will always be visible, even when scrolling down the page.', 'ari' ), 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', ) ); // Secondary Widget area (right, additional sidebar) register_sidebar( array( 'name' => __( 'Secondary Widget Area', 'ari' ), 'id' => 'secondary-widget-area', 'description' => __( 'Here you can put all the additional widgets for your right sidebar.', 'ari' ), 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', ) ); } /* Register sidebars by running ari_widgets_init() on the widgets_init hook. */ add_action( 'widgets_init', 'ari_widgets_init' ); /* Removes the default styles that are packaged with the Recent Comments widget. */ function ari_remove_recent_comments_style() { global $wp_widget_factory; remove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) ); } add_action( 'widgets_init', 'ari_remove_recent_comments_style' ); if ( ! function_exists( 'ari_posted_on' ) ) : /* Prints HTML with meta information for the current post—date/time and author. */ function ari_posted_on() { printf( __( 'Posted on %2$s by %3$s', 'ari' ), 'meta-prep meta-prep-author', sprintf( '%3$s', get_permalink(), esc_attr( get_the_time() ), get_the_date() ), sprintf( '%3$s', get_author_posts_url( get_the_author_meta( 'ID' ) ), sprintf( esc_attr__( 'View all posts by %s', 'ari' ), get_the_author() ), get_the_author() ) ); } endif; /* Custom Ari Social Links Widget */ class Ari_SocialLinks_Widget extends WP_Widget { function Ari_SocialLinks_Widget() { $widget_ops = array('classname' => 'widget_social_links', 'description' => 'A list with your social profile links' ); $this->WP_Widget('social_links', 'Ari Social Links', $widget_ops); } function widget($args, $instance) { extract($args, EXTR_SKIP); echo $before_widget; $title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']); $rss_title = empty($instance['rss_title']) ? ' ' : apply_filters('widget_rss_title', $instance['rss_title']); $rss_url = empty($instance['rss_url']) ? ' ' : apply_filters('widget_rss_url', $instance['rss_url']); $twitter_title = empty($instance['twitter_title']) ? ' ' : apply_filters('widget_twitter_title', $instance['twitter_title']); $twitter_url = empty($instance['twitter_url']) ? ' ' : apply_filters('widget_twitter_url', $instance['twitter_url']); $fb_title = empty($instance['fb_title']) ? ' ' : apply_filters('widget_fb_title', $instance['fb_title']); $fb_url = empty($instance['fb_url']) ? ' ' : apply_filters('widget_fb_url', $instance['fb_url']); $flickr_title = empty($instance['flickr_title']) ? ' ' : apply_filters('widget_flickr_title', $instance['flickr_title']); $flickr_url = empty($instance['flickr_url']) ? ' ' : apply_filters('widget_flickr_url', $instance['flickr_url']); $xing_title = empty($instance['xing_title']) ? ' ' : apply_filters('widget_xing_title', $instance['xing_title']); $xing_url = empty($instance['xing_url']) ? ' ' : apply_filters('widget_xing_url', $instance['xing_url']); $linkedin_title = empty($instance['linkedin_title']) ? ' ' : apply_filters('widget_linkedin_title', $instance['linkedin_title']); $linkedin_url = empty($instance['linkedin_url']) ? ' ' : apply_filters('widget_linkedin_url', $instance['linkedin_url']); $delicious_title = empty($instance['delicious_title']) ? ' ' : apply_filters('widget_delicious_title', $instance['delicious_title']); $delicious_url = empty($instance['delicious_url']) ? ' ' : apply_filters('widget_delicious_url', $instance['delicious_url']); if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; echo ''; echo $after_widget; } function update($new_instance, $old_instance) { $instance = $old_instance; $instance['title'] = strip_tags($new_instance['title']); $instance['rss_title'] = strip_tags($new_instance['rss_title']); $instance['rss_url'] = strip_tags($new_instance['rss_url']); $instance['twitter_title'] = strip_tags($new_instance['twitter_title']); $instance['twitter_url'] = strip_tags($new_instance['twitter_url']); $instance['fb_title'] = strip_tags($new_instance['fb_title']); $instance['fb_url'] = strip_tags($new_instance['fb_url']); $instance['flickr_title'] = strip_tags($new_instance['flickr_title']); $instance['flickr_url'] = strip_tags($new_instance['flickr_url']); $instance['xing_title'] = strip_tags($new_instance['xing_title']); $instance['xing_url'] = strip_tags($new_instance['xing_url']); $instance['linkedin_title'] = strip_tags($new_instance['linkedin_title']); $instance['linkedin_url'] = strip_tags($new_instance['linkedin_url']); $instance['delicious_title'] = strip_tags($new_instance['delicious_title']); $instance['delicious_url'] = strip_tags($new_instance['delicious_url']); return $instance; } function form($instance) { $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'twitter_title' => '', 'comments_title' => '' ) ); $title = strip_tags($instance['title']); $rss_title = strip_tags($instance['rss_title']); $rss_url = strip_tags($instance['rss_url']); $twitter_title = strip_tags($instance['twitter_title']); $twitter_url = strip_tags($instance['twitter_url']); $fb_title = strip_tags($instance['fb_title']); $fb_url = strip_tags($instance['fb_url']); $flickr_title = strip_tags($instance['flickr_title']); $flickr_url = strip_tags($instance['flickr_url']); $xing_title = strip_tags($instance['xing_title']); $xing_url = strip_tags($instance['xing_url']); $linkedin_title = strip_tags($instance['linkedin_title']); $linkedin_url = strip_tags($instance['linkedin_url']); $delicious_title = strip_tags($instance['delicious_title']); $delicious_url = strip_tags($instance['delicious_url']); ?>


    />

    Name that Color online-tool)', 'ari'); ?>


    (the maximum logo image size is: 240 x 75 Pixel)', 'ari'); ?>

    ";'));