'.$license['title'].' license; additional terms may apply.'; } function awe_video_url(){ if ( get_option('permalink_structure') != '' ) { return get_home_url().'/video/'; } else { return get_home_url().'?post_type=video'; } } function awe_door_video_menu() { global $wp_query; $post_type = isset( $wp_query->post->post_type ) ? $wp_query->post->post_type : null; $current = ''; if ( $post_type == 'video' && !is_search() ) { $current = ' current-menu-item'; } print ' post_type == 'video' ) { $image_id = get_post_thumbnail_id( $post->ID ); $poster = wp_get_attachment_image_src( $image_id, 'awevideo-poster' ); $video = AWE_Videos::retrieve($post->ID); if ( $view == 'summary_topic' || $view == 'summary_video' ) { if ( is_sticky( $post->ID ) ) { $sticky_class = ' sticky'; } else { $sticky_class = ''; } if ( $count == 9 ) { $fold = ' awedoor-page-fold'; } else { $fold = ''; } print '
'; ?> ID ); $poster = wp_get_attachment_image_src( $image_id, 'awevideo-thumbnail' ); print ''; ?>
ID ) ) { $sticky_class = ' sticky'; } else { $sticky_class = ''; } if ( $count == 3 ) { $fold = ' awedoor-page-fold'; } else { $fold = ''; } print '
'; $uri = get_permalink( $post->ID ); print '

'.mysql2date(get_option('date_format'), $post->post_date).' : '.apply_filters( 'the_title', $post->post_title ).'

'; if ( has_post_thumbnail( $post->ID ) ) { $image_id = get_post_thumbnail_id( $post->ID ); $image = wp_get_attachment_image_src( $image_id, 'awedoor-thumbnail' ); print '
[]
'; } print get_post_excerpt( $post, 40 ); print ''; print '
'; print '
Topics:
    '; $topics = wp_get_post_terms( $post->ID, 'topic' ); $total = count( $topics ); $topics = array_splice( $topics, 0, 7 ); if ( count( $topics ) > 0 ) { foreach( $topics as $topic ) { print '
  • '.$topic->name.'
  • '; }; if ( $total > count( $topics ) ) print '
  • ...
  • '; print '
'; } print '
'; print '
'; } else { wp_enqueue_script( 'video-page', get_template_directory_uri().'/static/video-page.js', array( 'jquery' ) ); ?>

'; print '
'; $cats = get_the_terms( $post->ID, 'topic' ); $total = count( $cats ); $cats = array_splice( $cats, 0, 7 ); if ( count( $cats ) > 0 ) { print 'Topics:
'; } if (! comments_open() && ! is_page() && post_type_supports( get_post_type(), 'comments' ) ) { print '
'.__( 'Comments are closed.', 'awedoor' ).'
'; } else { print ''; comments_number( '', '1 Comment', '% Comments' ); print ''; } print ''; ?>
__('Show more', 'awedoor' ), 'template_directory' => get_template_directory_uri() ) ); wp_enqueue_script( 'jquery-easing', get_template_directory_uri().'/static/jquery.easing.1.3.js', array( 'jquery' ) ); wp_enqueue_script( 'jquery-vgrid', get_template_directory_uri().'/static/jquery.vgrid.0.1.7.min.js', array( 'jquery' ) ); wp_enqueue_script( 'footer', get_template_directory_uri().'/static/footer.js', array( 'jquery-vgrid' ) ); do_action( 'awe_door_scripts' ); } register_sidebar(array( 'id' => 'footer-widgets', 'name' => 'Footer Widgets', 'description' => 'Widget area at the footer', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); if ( ! isset( $content_width ) ) $content_width = 697; add_action( 'after_setup_theme', 'my_theme_setup' ); function my_theme_setup(){ load_theme_textdomain( 'awedoor', get_template_directory() . '/languages' ); } define( 'BACKGROUND_COLOR', 'ffe' ); add_custom_background(); define( 'NO_HEADER_TEXT', true ); define( 'HEADER_TEXTCOLOR', '000' ); //define( 'HEADER_IMAGE', '' ); define( 'HEADER_IMAGE_WIDTH', apply_filters( 'awedoor_header_image_width', 220 ) ); define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'awedoor_header_image_height', 220 ) ); add_theme_support('custom-header'); add_custom_image_header( 'awedoor_header_style', 'awedoor_admin_header_style', 'awedoor_admin_header_image' ); function awedoor_admin_header_image() { ?>
'.get_bloginfo('name', 'display').''; } else { ?>

__( 'Top Menu', 'awedoor' ), 'bottom' => __( 'Bottom Menu', 'awedoor' ) ) ); add_action( 'awe_door_post', 'awe_door_post', 0, 3 ); if ( is_admin() ) { add_action( 'wp_ajax_posts_pagination', 'awe_door_ajax_posts_pagination', 0 ); add_action( 'wp_ajax_nopriv_posts_pagination', 'awe_door_ajax_posts_pagination', 0 ); } add_action('wp_head','awe_door_ajaxurl'); function awe_door_ajaxurl() { global $wp_query; print ''; } function awe_door_ajax_posts_pagination(){ $args = array( 'cat' => $_REQUEST['cat'] ? $_REQUEST['cat'] : '', 'tag' => $_REQUEST['tag'] ? $_REQUEST['tag'] : '', 'monthnum' => $_REQUEST['monthnum'] ? $_REQUEST['monthnum'] : '', 'year' => $_REQUEST['year'] ? $_REQUEST['year'] : '', 'day' => $_REQUEST['day'] ? $_REQUEST['day'] : '', 's' => $_REQUEST['s'] ? $_REQUEST['s'] : '', 'author' => $_REQUEST['author'] ? $_REQUEST['author'] : '', 'post_type' => $_REQUEST['post_type'] ? $_REQUEST['post_type'] : '', 'paged' => $_REQUEST['paged'] ); if ( isset( $_REQUEST['taxonomy'] ) && isset( $_REQUEST['taxonomy_value'] ) ) { $args[ $_REQUEST['taxonomy'] ] = $_REQUEST['taxonomy_value']; } query_posts( $args ); if ( have_posts() ) : while ( have_posts() ) : the_post(); global $post; if ( !empty( $args['post_type'] ) ) { $view = 'summary_'.$args['post_type']; } else if ( isset( $args['taxonomy'] ) ) { $view = 'summary_'.$taxonomy; } else { $view = 'summary'; } do_action( 'awe_door_post', $post, $view, 0 ); endwhile; else: header( "HTTP/1.0 404 Not Found" ); endif; exit(); } function awe_door_pagination(){ ?> post_type == 'post' ) { if ( $view == 'summary' ) { if ( is_sticky( $post->ID ) ) { $sticky_class = ' sticky'; } else { $sticky_class = ''; } if ( $count == 3 ) { $fold = ' awedoor-page-fold'; } else { $fold = ''; } print '
'; $uri = get_permalink( $post->ID ); print '

'.mysql2date(get_option('date_format'), $post->post_date).' : '.apply_filters( 'the_title', $post->post_title ).'

'; if ( has_post_thumbnail( $post->ID ) ) { $image_id = get_post_thumbnail_id( $post->ID ); $image = wp_get_attachment_image_src( $image_id, 'awedoor-thumbnail' ); print '[]'; } print get_post_excerpt( $post, 40 ); if ( !has_post_thumbnail( $post->ID ) ){ $image_posts = &get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image' ) ); if ( !empty( $image_posts ) ) { foreach ( $image_posts as $attachment_id => $attachment ) { $image = wp_get_attachment_image_src( $attachment_id, 'awedoor-thumbnail' ); $url = get_permalink( $attachment_id ); print ''; } } } print ''; print '
'; print '
'; $cats = get_the_category( $post->ID ); $total = count( $cats ); $cats = array_splice( $cats, 0, 7 ); if ( count( $cats ) > 0 ) { print 'Categories:
    '; foreach( $cats as $cat ) { print '
  • '.$cat->name.'
  • '; }; if ( $total > count( $cats ) ) print '
  • ...
  • '; print '
'; } $tags = wp_get_post_tags( $post->ID ); $total = count( $tags ); $tags = array_splice( $tags, 0, 7 ); if ( count( $tags ) > 0 ) { print '
Tags:
    '; foreach( $tags as $tag ) { print '
  • '.$tag->name.'
  • '; }; if ( $total > count( $tags ) ) print '
  • ...
  • '; print '
'; } if (! comments_open() && ! is_page() && post_type_supports( get_post_type(), 'comments' ) ) { print '
'.__( 'Comments are closed.', 'awedoor' ).'
'; } else { print ''; comments_number( '', '1 Comment', '% Comments' ); print ''; } print '
'; print '
'; } else if ( $view == 'full' ) { $uri = get_permalink( $post->ID ); $date = get_the_date(); print '
'; print '

'.apply_filters( 'the_title', $post->post_title ).'

'; $author = get_userdata( $post->post_author ); print '
By '.$author->display_name.'
'; print '
'; the_content(); //.apply_filters( 'the_content', $post->post_content ).''; print '
'; wp_link_pages( array( 'before' => '' ) ); print '
'; print '
'; print '
'; print '
Categories:
    '; $cats = get_the_category( $post->ID ); if ( count( $cats ) > 0 ) { foreach( $cats as $cat ) { print '
  • '.$cat->name.'
  • '; }; print '
'; } $tags_list = get_the_tag_list(); //theme-check won't pass without this $tags = wp_get_post_tags( $post->ID ); if ( count( $tags ) > 0 ) { print '
Tags:
'; } if (! comments_open() && ! is_page() && post_type_supports( get_post_type(), 'comments' ) ) { print '
'.__( 'Comments are closed.', 'awedoor' ).'
'; } else { ?> ' . get_the_title() . '' ); ?> '; print '
'; print '
'; $prev = get_next_post(); if ( $prev != null ) { print '
'; print '

Previous

'; $url = get_permalink( $prev->ID ); print ''.apply_filters( 'the_title', $prev->post_title ).''; print '
'; print get_post_excerpt( $prev, 40 ); print ''; print '
'; print '
'; } $next = get_previous_post(); if ( $next != null ) { print '
'; print '

Next

'; $url = get_permalink( $next->ID ); print ''.apply_filters('the_title', $next->post_title ).''; print '
'; print get_post_excerpt( $next, 40 ); print ''; print '
'; print '
'; } print '
'; print '
'; print '
'; } } else if ( $post->post_type == 'page' ) { if ( $view == 'summary' ) { if ( is_sticky( $post->ID ) ) { $sticky_class = ' sticky'; } else { $sticky_class = ''; } print '
'; $uri = get_permalink( $post->ID ); print '

'.mysql2date(get_option('date_format'), $post->post_date).' : '.apply_filters( 'the_title', $post->post_title ).'

'; print get_post_excerpt( $post, 40 ); print '
'; } } else if ( $post->post_type == 'attachment' ) { print '
'; if ( strpos( $post->post_mime_type, 'image' ) >= 0 ) { print '

'.get_the_date().' '; if ( $post->post_title ) { print ' : '.$post->post_title; } print '

'; // title $author = get_userdata( $post->post_author ); // author id print '
'.$author->display_name.'
'; $image_src = wp_get_attachment_image_src( $post->ID, 'awedoor-body' ); $img_alt = get_post_meta( $post->ID, '_wp_attachment_image_alt', true); //alt if ($img_alt == '') { $img_alt = $post->post_title; } print '
['.$img_alt.']
'; print '

'.$post->post_excerpt.'

'; // caption print '
'; print '

'.$post->post_content.'

'; // description print '
'; print '

Image Sizes

'; //$image_sizes = get_intermediate_image_sizes(); $image_sizes = array('thumbnail','medium','large', 'original'); print ''; print ''; foreach ( $image_sizes as $image_size ) { $image_src = wp_get_attachment_image_src( $post->ID, $image_size ); print ''; } print '
'.__('Width').''.__('Height').''.__('Title').'
'.$image_src[1].''.$image_src[2].''.$image_size.''.__('View', 'awedoor').'
'; print '
'; print '
'; print '

Navigation

'; $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; } } $prev = $k - 1; $next = $k + 1; if ( isset($attachments[$prev]) ) { $img = wp_get_attachment_image_src( $attachments[$prev]->ID, 'awedoor-thumbnail' ); $url = get_attachment_link( $attachments[$prev]->ID ); print '
[]Previous
'; } if ( isset($attachments[$next]) ) { $img = wp_get_attachment_image_src( $attachments[$next]->ID, 'awedoor-thumbnail' ); $url = get_attachment_link( $attachments[$next]->ID ); print '
[]Next
'; } print '
'; print '
'; print '
'; } else { print ''.wp_get_attachment_url( $post->ID ).''; } print '
'; } } function get_post_excerpt($item, $excerpt_length=55, $excerpt_more='...') { $text = $item->post_excerpt; $raw_excerpt = $text; if ( '' == $text ) { $text = $item->post_content; $text = strip_shortcodes($text); $text = apply_filters('the_content', $text); $text = str_replace(']]>', ']]>', $text); $text = strip_tags($text); $words = preg_split("/[\n\r\t ]+/", $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY); if ( count($words) > $excerpt_length ) { array_pop($words); $text = implode(' ', $words); $text = $text . $excerpt_more; } else { $text = implode(' ', $words); } } $text = apply_filters('get_the_excerpt', $text); $text = apply_filters('the_excerpt', $text); return $text; } if ( ! function_exists( 'awedoor_comment' ) ) : /** * Template for comments and pingbacks. * * To override this walker in a child theme without modifying the comments template * simply create your own awedoor_comment(), and that function will be used instead. * * Used as a callback by wp_list_comments() for displaying the comments. * * @since AWE Door 0.1 */ function awedoor_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case 'pingback' : case 'trackback' : ?>
  • id="li-comment-">
    comment_parent ) $avatar_size = 32; echo get_avatar( $comment, $avatar_size ); /* translators: 1: comment author, 2: date and time */ printf( __( '%1$s / %2$s says:', 'awedoor' ), sprintf( '', esc_url( get_comment_link( $comment->comment_ID ) ), get_comment_time( 'c' ), /* translators: 1: date, 2: time */ sprintf( __( '%1$s at %2$s', 'awedoor' ), get_comment_date(), get_comment_time() ) ), sprintf( '%s', get_comment_author_link() ) ); ?>
    comment_approved == '0' ) : ?>
    __( 'Reply ', 'awedoor' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>