esc_html__('Floating Menu','bcorp-basics'))); add_theme_support('post-formats',array('aside','gallery','link','image','quote','video','audio','status')); add_theme_support('html5',array('search-form','comment-form','comment-list','gallery','caption')); add_theme_support('title-tag'); add_theme_support('post-thumbnails'); add_theme_support('automatic-feed-links'); global $bcorp_full_width_theme; $bcorp_full_width_theme = true; set_post_thumbnail_size( 840, 560, true ); add_image_size('300 x 200 cropped', 300, 200, true); add_image_size('350 x 300 cropped', 350, 300, true); add_image_size('375 x 250 cropped', 375, 250, true); add_image_size('400 x 350 cropped', 400, 350, true); add_image_size('600 x 300',600,300,false); add_image_size('600 x 300 cropped',600,300,true); add_image_size('600 x 400 cropped', 600, 400, true); add_image_size('600 x 600',600,600,false); add_image_size('675 x 600 cropped', 675, 600, true); add_image_size('768 x 512 cropped', 768, 512, true); add_image_size('900 x 300 cropped', 900, 300, true); add_image_size('900 x 600 cropped', 900, 600, true); add_image_size('1280 x 720 cropped', 1280, 720, true); add_image_size('1310 x 450 cropped', 1310, 450, true); add_image_size('1310 x 655 cropped', 1310, 655, true); add_image_size('1920 x 1080 cropped', 1920, 1080, true); } endif; add_filter( 'image_size_names_choose', 'bcorp_custom_sizes' ); if (!function_exists('bcorp_custom_sizes')): function bcorp_custom_sizes($sizes) { return array_merge($sizes,array( '300 x 200 cropped' => esc_html__('300 x 200 cropped','bcorp-basics'), '350 x 300 cropped' => esc_html__('350 x 300 cropped','bcorp-basics'), '375 x 250 cropped' => esc_html__('375 x 250 cropped','bcorp-basics'), '400 x 350 cropped' => esc_html__('400 x 350 cropped','bcorp-basics'), '600 x 300' => esc_html__('600 x 300','bcorp-basics'), '600 x 300 cropped' => esc_html__('600 x 300 cropped','bcorp-basics'), '600 x 400 cropped' => esc_html__('600 x 400 cropped','bcorp-basics'), '600 x 600' => esc_html__('600 x 600','bcorp-basics'), '675 x 600 cropped' => esc_html__('675 x 600 cropped','bcorp-basics'), '768 x 512 cropped' => esc_html__('768 x 512 cropped','bcorp-basics'), '900 x 300 cropped' => esc_html__('900 x 300 cropped','bcorp-basics'), '900 x 600 cropped' => esc_html__('900 x 600 cropped','bcorp-basics'), '1310 x 450 cropped' => esc_html__('1310 x 450 cropped','bcorp-basics'), )); } endif; add_filter('the_content', 'bcorp_shortcode_empty_paragraph_fix'); if (!function_exists('bcorp_shortcode_empty_paragraph_fix')): function bcorp_shortcode_empty_paragraph_fix($content) { $array = array ( '

[' => '[', ']

' => ']', ']
' => ']' ); return strtr($content, $array); } endif; add_action( 'wp_head', 'bcorp_js_class', 1 ); if (!function_exists('bcorp_js_class')): function bcorp_js_class () { echo ''. "\n"; } endif; add_filter('get_search_form', 'bcorp_search_form'); if (!function_exists('bcorp_search_form')): function bcorp_search_form($text) { $text=''; return $text; } endif; if ( ! function_exists( '_wp_render_title_tag' ) ) : function bcorp_theme_slug_render_title() { ?> <?php wp_title( '|', true, 'right' ); ?> esc_html__( 'Everywhere', 'bcorp-basics' ), 'id' => 'everywhere', 'description' => '', 'class' => '', 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '
    ', 'after_title' => '
    ' ); register_sidebar( $args ); register_sidebar( array( 'name' => esc_html__( 'Footer Column 1', 'bcorp-basics' ), 'id' => 'bcorp_footer_1', 'description' => esc_html__( 'Appears in the footer section of the site.', 'bcorp-basics' ), 'before_widget' => '', 'before_title' => '
    ', 'after_title' => '
    ', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer Column 2', 'bcorp-basics' ), 'id' => 'bcorp_footer_2', 'description' => esc_html__( 'Appears in the footer section of the site.', 'bcorp-basics' ), 'before_widget' => '', 'before_title' => '
    ', 'after_title' => '
    ', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer Column 3', 'bcorp-basics' ), 'id' => 'bcorp_footer_3', 'description' => esc_html__( 'Appears in the footer section of the site.', 'bcorp-basics' ), 'before_widget' => '', 'before_title' => '
    ', 'after_title' => '
    ', ) ); } endif; add_action('wp_enqueue_scripts', 'bcorp_enqueue_scripts' ); if (!function_exists('bcorp_enqueue_scripts')): function bcorp_enqueue_scripts() { wp_enqueue_script('jquery'); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); wp_enqueue_style( 'bcorp-dashicons-style', get_stylesheet_uri(), array('dashicons')); wp_enqueue_script('sticky_js', get_template_directory_uri().'/js/jquery.sticky.js','','',true); wp_enqueue_script('bcorp_js',get_template_directory_uri().'/js/bcorp.js','','',true); } endif; if (!function_exists('bcorp_sidebar_position')): function bcorp_sidebar_position($id) { global $bcorp_sidebar_position; if ($bcorp_sidebar_position) return $bcorp_sidebar_position; if (is_page()) $bcorp_sidebar_position = "bcorp_no_sidebar"; else $bcorp_sidebar_position = "bcorp-right-sidebar"; return $bcorp_sidebar_position; } endif; if (!function_exists('bcorp_get_title')): function bcorp_get_title() { if (is_category()) echo 'Category: '.single_cat_title( '', false ) ; elseif (is_tag()) echo 'Tag: '.single_tag_title( '', false ) ; elseif (is_search()) echo esc_html__('Search Results for: ','bcorp-basics').get_search_query(); elseif (is_404()) echo esc_html__('Page Not Found','bcorp-basics'); elseif (is_author()) echo esc_html__('Posts by ','bcorp-basics').get_the_author(); elseif (is_archive()) { if (get_post_format()) echo ucfirst(get_post_format()).' Archives'; elseif ( is_day() ) echo esc_html__( 'Daily Archives: ', 'bcorp-basics' ). get_the_date(); elseif ( is_month() ) echo esc_html__( 'Monthly Archives: ', 'bcorp-basics' ). get_the_date( _x( 'F Y', 'monthly archives date format', 'bcorp-basics' ) ); elseif ( is_year() ) echo esc_html__( 'Yearly Archives: ', 'bcorp-basics' ). get_the_date( _x( 'Y', 'yearly archives date format', 'bcorp-basics' ) ) ; else echo esc_html_e( 'Archives', 'bcorp-basics' ); } elseif (is_home()) echo bloginfo('name'); else echo substr(get_the_title(),0,35); } endif; if (!function_exists('bcorp_get_breadcrumbs')): function bcorp_get_breadcrumbs() { global $wp_query; if ( !is_front_page() ){ echo '"; } } endif; if (!function_exists('bcorp_get_link_url')): function bcorp_get_link_url() { $has_url = get_url_in_content(get_the_content()); return $has_url ? $has_url : apply_filters( 'the_permalink', get_permalink() ); } endif; if (!function_exists('bcorp_full_width')): function bcorp_full_width() { global $bcorp_sidebar_position; if ($bcorp_sidebar_position === 'bcorp_no_sidebar') return '1310 x 450 cropped'; return 'post-thumbnail'; } endif; if (!function_exists('bcorp_post_thumbnail')): function bcorp_post_thumbnail() { if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) { return; } ?>
    max_num_pages < 2 ) { return; } $paged = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1; $pagenum_link = html_entity_decode( get_pagenum_link() ); $query_args = array(); $url_parts = explode( '?', $pagenum_link ); if ( isset( $url_parts[1] ) ) { wp_parse_str( $url_parts[1], $query_args ); } $pagenum_link = remove_query_arg( array_keys( $query_args ), $pagenum_link ); $pagenum_link = trailingslashit( $pagenum_link ) . '%_%'; $format = $GLOBALS['wp_rewrite']->using_index_permalinks() && ! strpos( $pagenum_link, 'index.php' ) ? 'index.php/' : ''; $format .= $GLOBALS['wp_rewrite']->using_permalinks() ? user_trailingslashit( 'page/%#%', 'paged' ) : '?paged=%#%'; // Set up paginated links. $links = paginate_links( array( 'base' => $pagenum_link, 'format' => $format, 'total' => $GLOBALS['wp_query']->max_num_pages, 'current' => $paged, 'mid_size' => 1, 'add_args' => array_map( 'urlencode', $query_args ), 'prev_text' => esc_html__( '← Previous', 'bcorp-basics' ), 'next_text' => esc_html__( 'Next →', 'bcorp-basics' ), ) ); if ( $links ) { ?> post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) { return; } ?> '', 'link_before' => '', 'link_after' => '', ) ); } endif; if (!function_exists('bcorp_post_meta')): function bcorp_post_meta() { if (get_post_format()) { $posttype = ''.get_post_format_string( get_post_format()).''; } else $posttype = ''; if ( is_sticky() && is_home() && ! is_paged() ) { $postdate = '' . esc_html__( 'Sticky', 'bcorp-basics' ) . ''; } else { $postdate = sprintf( '',esc_attr(get_the_date('c')),esc_html(get_the_date())); } if (in_array('category',get_object_taxonomies(get_post_type()))) { $postcategory = ''.get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'bcorp-basics' ) ).''; } else $postcategory = ''; $postauthor = sprintf( ' by ',get_author_posts_url(get_the_author_meta('ID')),get_the_author()); ob_start(); echo the_tags( ' ', ', ', '' ); $posttags = ob_get_clean(); ob_start(); if (!post_password_required()) { ?> '.esc_html__( 'Edit', 'bcorp-basics' ).''; } else $postedit =''; if (!is_single()) $posttitle = '

    '.get_the_title().'

    '; else $posttitle = '

    '.get_the_title().'

    '; echo '
    '.$postcategory.$posttitle.'
    '; echo $posttype.$postdate.$postauthor.$posttags.$postcomments.$postedit.'
    '; } endif; if (!function_exists('bcorp_tags')): function bcorp_tags() { if (is_single()) the_tags( '', ' ', '' ); } endif; if (!function_exists('bcorp_categorized_blog')): function bcorp_categorized_blog() { if (false===($all_cats=get_transient('bcorp_category_count'))) set_transient('bcorp_category_count', count(get_categories(array( 'hide_empty' => 1)))); if (1!==(int)$all_cats ) return true; else false; } endif; function bcorp_category_transient_flusher() { delete_transient( 'bcorp_category_count' ); } add_action( 'edit_category', 'bcorp_category_transient_flusher' ); add_action( 'save_post', 'bcorp_category_transient_flusher' ); if (!function_exists('bcorp_the_attached_image')): function bcorp_the_attached_image() { $post = get_post(); $next_attachment_url = wp_get_attachment_url(); $attachment_ids = get_posts( array( 'post_parent' => $post->post_parent, 'fields' => 'ids', 'numberposts' => -1, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID', ) ); if ( count( $attachment_ids ) > 1 ) { foreach ( $attachment_ids as $attachment_id ) { if ( $attachment_id == $post->ID ) { $next_id = current( $attachment_ids ); break; } } if ( $next_id ) $next_attachment_url = get_attachment_link( $next_id ); else $next_attachment_url = get_attachment_link( array_shift( $attachment_ids ) ); } printf( '%2$s',esc_url( $next_attachment_url ),wp_get_attachment_image( $post->ID, '900 x 600 cropped' ) ); } endif; require_once dirname( __FILE__ ).'/includes/plugin-activation.php'; add_action( 'tgmpa_register', 'bcorp_register_required_plugins' ); if (!function_exists('bcorp_register_required_plugins')): function bcorp_register_required_plugins() { $plugins = array( array( 'name' => 'BCorp Shortcodes', 'slug' => 'bcorp-shortcodes', 'required' => false, ), array( 'name' => 'BCorp Visual Editor', 'slug' => 'bcorp-visual-editor', 'required' => false, ), ); $config = array( 'default_path' => '', // Default absolute path to pre-packaged plugins. 'menu' => 'tgmpa-install-plugins', // Menu slug. 'has_notices' => true, // Show admin notices or not. 'dismissable' => true, // If false, a user cannot dismiss the nag message. 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag. 'is_automatic' => true, // Automatically activate plugins after installation or not. 'message' => '', // Message to output right before the plugins table. 'strings' => array( 'page_title' => esc_html__( 'Install Required Plugins', 'bcorp-basics' ), 'menu_title' => esc_html__( 'Install Plugins', 'bcorp-basics' ), 'installing' => esc_html__( 'Installing Plugin: %s', 'bcorp-basics' ), // %s = plugin name. 'oops' => esc_html__( 'Something went wrong with the plugin API.', 'bcorp-basics' ), 'notice_can_install_required' => _n_noop( 'This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.' , 'bcorp-basics'), // %1$s = plugin name(s). 'notice_can_install_recommended' => _n_noop( 'This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.' , 'bcorp-basics'), // %1$s = plugin name(s). 'notice_cannot_install' => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.' , 'bcorp-basics'), // %1$s = plugin name(s). 'notice_can_activate_required' => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.' , 'bcorp-basics'), // %1$s = plugin name(s). 'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.', 'bcorp-basics' ), // %1$s = plugin name(s). 'notice_cannot_activate' => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.' , 'bcorp-basics'), // %1$s = plugin name(s). 'notice_ask_to_update' => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.' , 'bcorp-basics'), // %1$s = plugin name(s). 'notice_cannot_update' => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.' , 'bcorp-basics'), // %1$s = plugin name(s). 'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins' , 'bcorp-basics'), 'activate_link' => _n_noop( 'Begin activating plugin', 'Begin activating plugins' , 'bcorp-basics'), 'return' => esc_html__( 'Return to Required Plugins Installer', 'bcorp-basics' ), 'plugin_activated' => esc_html__( 'Plugin activated successfully.', 'bcorp-basics' ), 'complete' => esc_html__( 'All plugins installed and activated successfully. %s', 'bcorp-basics' ), // %s = dashboard link. 'nag_type' => 'updated' // Determines admin notice type - can only be 'updated', 'update-nag' or 'error'. ) ); tgmpa( $plugins, $config ); } endif; ?>