==================================== */ add_theme_support( 'automatic-feed-links' ); /* Add support for WP 4.1 title tag ==================================== */ add_theme_support( 'title-tag' ); if ( ! function_exists( '_wp_render_title_tag' ) ) : function blackboard_lite_render_title() { ?> <?php wp_title( '|', true, 'right' ); ?> 'Sidebar: Left', 'id' => 'sidebar', 'before_widget' => '
', 'after_widget' => '
 
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name'=>'Sidebar: Right', 'id' => 'sidebar-right', 'before_widget' => '
', 'after_widget' => '
 
', 'before_title' => '

', 'after_title' => '

', )); /*----------------------------------*/ /* Homepage */ /*----------------------------------*/ register_sidebar(array( 'name'=>'Homepage Content: Middle Column', 'id' => 'home-col-1', 'before_widget' => '
', 'after_widget' => '
 
', 'before_title' => '

', 'after_title' => '

', )); /*----------------------------------*/ /* Header */ /*----------------------------------*/ register_sidebar(array( 'name'=>'Header', 'id' => 'header-right', 'description'=>'It is recommended to add no more than 2 widgets. Best works with Search and Text widgets.', 'before_widget' => '
', 'after_widget' => '
 
', 'before_title' => '

', 'after_title' => '

', )); /*----------------------------------*/ /* Footer */ /*----------------------------------*/ register_sidebar(array('name'=>'Footer: Column 1', 'id' => 'footer-col-1', 'before_widget' => '
', 'after_widget' => '
 
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array('name'=>'Footer: Column 2', 'id' => 'footer-col-2', 'before_widget' => '
', 'after_widget' => '
 
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array('name'=>'Footer: Column 3', 'id' => 'footer-col-3', 'before_widget' => '
', 'after_widget' => '
 
', 'before_title' => '

', 'after_title' => '

', )); } add_action( 'widgets_init', 'blackboard_lite_widgets_init' ); /* Enable Excerpts for Static Pages ==================================== */ add_action( 'init', 'blackboard_lite_excerpts_for_pages' ); function blackboard_lite_excerpts_for_pages() { add_post_type_support( 'page', 'excerpt' ); } /* Custom Excerpt Length ==================================== */ function blackboard_lite_new_excerpt_length($length) { return 35; } add_filter('excerpt_length', 'blackboard_lite_new_excerpt_length'); /* Replace invalid ellipsis from excerpts ==================================== */ function blackboard_lite_excerpt($text) { return str_replace('[...]', '...', $text); } add_filter('the_excerpt', 'blackboard_lite_excerpt'); /* Reset [gallery] shortcode styles ==================================== */ add_filter('gallery_style', create_function('$a', 'return "
";')); /* Custom Pagination for the Blog page template ==================================== */ function blackboard_lite_pagination($numpages = '', $pagerange = '', $paged='') { if (empty($pagerange)) { $pagerange = 2; } /** * This first part of our function is a fallback * for custom pagination inside a regular loop that * uses the global $paged and global $wp_query variables. * * It's good because we can now override default pagination * in our theme, and use this function in default quries * and custom queries. */ global $paged; if (empty($paged)) { $paged = 1; } if ($numpages == '') { global $wp_query; $numpages = $wp_query->max_num_pages; if(!$numpages) { $numpages = 1; } } /** * We construct the pagination arguments to enter into our paginate_links * function. */ $pagination_args = array( 'base' => get_pagenum_link(1) . '%_%', 'format' => 'page/%#%', 'total' => $numpages, 'current' => $paged, 'show_all' => False, 'end_size' => 1, 'mid_size' => $pagerange, 'prev_next' => True, 'prev_text' => __('«','blackboard_lite'), 'next_text' => __('»','blackboard_lite'), 'type' => 'plain', 'add_args' => false, 'add_fragment' => '' ); $paginate_links = paginate_links($pagination_args); if ($paginate_links) { echo ""; } } /* Comments Custom Template ==================================== */ function blackboard_lite_comments( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case '' : ?>
  • id="li-comment-">
    $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
    %s', get_comment_author_link() ) ); ?> • ' ); ?>
    comment_approved == '0' ) : ?>

     
  • id="li-comment-">

  • ================================== */ function blackboard_lite_customizer_head() { /* This block refers to the functionality of the Appearance > Customize screen. */ $academia_color_header = esc_attr(get_theme_mod( 'blackboard_lite_bgcolor_header' )); $academia_bordercolor_header = esc_attr(get_theme_mod( 'blackboard_lite_bordercolor_header' )); $academia_color_menu = esc_attr(get_theme_mod( 'blackboard_lite_bgcolor_menu' )); $academia_color_body = esc_attr(get_theme_mod( 'blackboard_lite_color_body' )); $academia_color_link = esc_attr(get_theme_mod( 'blackboard_lite_color_link' )); $academia_color_link_hover = esc_attr(get_theme_mod( 'blackboard_lite_color_link_hover' )); if( $academia_color_header != '' || $academia_bordercolor_header != '' || $academia_color_menu != '' || $academia_color_body != '' || $academia_color_link != '' || $academia_color_link_hover != '') { echo ''; } } add_action('wp_head', 'blackboard_lite_customizer_head'); /* Include WordPress Theme Customizer ================================== */ require_once('academia-admin/academia-customizer.php'); /* Include Additional Options and Components ================================== */ if ( !function_exists( 'get_the_image' ) ) { require_once('academia-admin/components/get-the-image.php'); } require_once('academia-admin/post-options.php');