__( 'Main' ))); } add_action( 'init', 'the_menus' ); if ( ! function_exists( 'dw_get_page_number' ) ) : function dw_get_page_number() { if ( get_query_var( 'paged' ) ) return ' | ' . __( 'Page ' , 'dw' ) . get_query_var( 'paged' ); } endif; if ( ! function_exists( 'dw_the_page_number' ) ) : function dw_the_page_number() { echo dw_get_page_number(); } endif; if ( ! function_exists( 'dw_excerpt_length' ) ) : function dw_excerpt_length( $length ) { return 40; } endif; add_filter( 'excerpt_length', 'dw_excerpt_length' ); if ( ! function_exists( 'daw_excerpt_more' ) ) : function dw_excerpt_more( $more ) { return ' … ' . __('Continue reading ', 'daw') . ''; } endif; add_filter( 'excerpt_more', 'dw_excerpt_more' ); if ( ! function_exists( 'dw_comment' ) ) : function dw_comment( $comment, $args, $depth ) { $GLOBALS ['comment'] = $comment; ?> comment_type ) : ?>
  • id="li-comment-">
    %s says:', 'daw' ), get_comment_author_link() ); ?>
    comment_approved == '0' ) : ?>
    $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
  • (.*?)#s", '', $css ); } endif; add_filter( 'gallery_style', 'dw_remove_gallery_css' ); if ( ! function_exists( 'dw_cat_list' ) ) : function dw_cat_list() { return daw_term_list( 'category', ', ', __( 'Posted in %s', 'dw' ), __( 'Also posted in %s', 'daw' ) ); } endif; if ( ! function_exists( 'dw_tag_list' ) ) : function dw_tag_list() { return daw_term_list( 'post_tag', ', ', __( 'Tagged %s', 'dw' ), __( 'Also tagged %s', 'daw' ) ); } endif; if ( ! function_exists( 'dw_term_list' ) ) : function daw_term_list( $taxonomy, $glue = ', ', $text = '', $also_text = '' ) { global $wp_query, $post; $current_term = $wp_query->get_queried_object(); $terms = wp_get_object_terms( $post->ID, $taxonomy ); // If we're viewing a Taxonomy page.. if ( isset( $current_term->taxonomy ) && $taxonomy == $current_term->taxonomy ) { // Remove the term from display. foreach ( (array) $terms as $key => $term ) { if ( $term->term_id == $current_term->term_id ) { unset( $terms[$key] ); break; } } // Change to Also text as we've now removed something from the terms list. $text = $also_text; } $tlist = array(); $rel = 'category' == $taxonomy ? 'rel="category"' : 'rel="tag"'; foreach ( (array) $terms as $term ) { $tlist[] = '' . $term->name . ''; } if ( ! empty( $tlist ) ) return sprintf( $text, join( $glue, $tlist ) ); return ''; } endif; if ( ! function_exists( 'dw_widgets_init' ) ) : function daw_widgets_init() { // Area Login register_sidebar( array ( 'name' => 'Login Widget Area', 'id' => 'login-widget-area', 'description' => __( 'The login widget area' , 'daw' ), 'before_widget' => '
  • ', 'after_widget' => "
  • ", 'before_title' => '

    ', 'after_title' => '

    ', ) ); } endif; add_action( 'init', 'daw_widgets_init' ); function dw_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', 'dw_remove_recent_comments_style' ); function dw_get_next_attachment_url() { global $post; $post = get_post( $post ); $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); foreach ( $attachments as $k => $attachment ) { if ( $attachment->ID == $post->ID ) break; } $k++; if ( isset( $attachments[ $k ] ) ) return get_attachment_link( $attachments[ $k ]->ID ); else return get_permalink( $post->post_parent ); } function dw_posted_on() { return sprintf( __( ' %2$s by %3$s', 'daw' ), 'class="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', 'daw' ), get_the_author() ), get_the_author() ) ); } function dw_posted_in() { $tag_list = get_the_tag_list( '', ', ', '' ); if ( $tag_list ) { $utility_text = __( '%1$s and tagged %2$s. permalink.', 'daw' ); } else { $utility_text = __( '%1$s. permalink.', 'daw' ); } return sprintf( $utility_text, get_the_category_list( ', ' ), $tag_list, get_permalink(), the_title_attribute( 'echo=0' ), get_post_comments_feed_link() ); } ?>