__('Primary Menu', 'bumbeelbee'),
'social' => __('Social Links Menu', 'bumbeelbee'),
));
/*
* Switch default core markup for search form, comment form, and comments
* to output valid HTML5.
*/
add_theme_support('html5', array(
'search-form', 'comment-form', 'comment-list', 'gallery', 'caption',
));
/*
* Enable support for Post Formats.
*/
add_theme_support('post-formats', array(
'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat',
));
}
endif; // bumbeelbee_setup
add_action('after_setup_theme', 'bumbeelbee_setup');
if (!function_exists('bumbeelbee_init')):
function bumbeelbee_init()
{
// Use categories and tags with attachments
register_taxonomy_for_object_type('category', 'attachment');
register_taxonomy_for_object_type('post_tag', 'attachment');
/*
* Register custom post types. You can also move this code to a plugin.
*/
/* Custom Post Types Begin */
/* Custom Post Types End */
/*
* Register custom taxonomies. You can also move this code to a plugin.
*/
/* Taxonomies Begin */
/* Taxonomies End */
}
endif; // bumbeelbee_setup
add_action('init', 'bumbeelbee_init');
/***
* Send Email Process
**/
function bumbeelbee_sendmail()
{
$name = ($_POST['name']);
$phone = ($_POST['phone']);
$msg = ($_POST['message']);
$email = ($_POST['email']);
$message = "Name: $name\n";
$message .= "Email Address: $email\n";
$message .= "Phone: $phone\n";
$message .= "Message:\n$msg";
$subject = "Contact from Website $name";
$headers = 'From: ' . $email . "\r\n" . 'Reply-To: ' . $email;
///
$to_email = esc_attr(get_theme_mod('email_text_block'));
// var_dump($to_email);
// die();
$email_sent = wp_mail($to_email, $subject, $message, $headers);
if ($email_sent) {
echo '
Success! Indicates a successful or positive action.
';
} else {
echo '
fail! Indicates a dangerous or potentially negative action.
';
}
die();
}
add_action('wp_ajax_siteWideMessage', 'bumbeelbee_sendmail');
add_action('wp_ajax_nopriv_siteWideMessage', 'bumbeelbee_sendmail');
if (!function_exists('bumbeelbee_enqueue_scripts')):
function bumbeelbee_enqueue_scripts()
{
/*Enqueue Scripts Begin */
wp_enqueue_script('jquery-custom', get_template_directory_uri() . '/vendor/jquery.min.js', false, null, true);
wp_enqueue_script('jquerymigrate', get_template_directory_uri() . '/vendor/jquery.migrate.min.js', array('jquery-custom'), null, true);
wp_enqueue_script('bootstrap', get_template_directory_uri() . '/vendor/bootstrap/js/bootstrap.min.js', array('jquery-custom'), null, true);
wp_enqueue_script('jquerysmoothscroll', get_template_directory_uri() . '/vendor/jquery.smooth-scroll.min.js', array('jquery-custom'), null, true);
wp_enqueue_script('jquerybacktotop', get_template_directory_uri() . '/vendor/jquery.back-to-top.min.js', array('jquery-custom'), null, true);
wp_enqueue_script('jqueryscrollbar', get_template_directory_uri() . '/vendor/scrollbar/jquery.scrollbar.min.js', array('jquery-custom'), null, true);
wp_enqueue_script('jquerymagnificpopup', get_template_directory_uri() . '/vendor/magnific-popup/jquery.magnific-popup.min.js', array('jquery-custom'), null, true);
wp_enqueue_script('swiperjquery', get_template_directory_uri() . '/vendor/swiper/swiper.jquery.min.js', array('jquery-custom'), null, true);
wp_enqueue_script('waypoint', get_template_directory_uri() . '/vendor/waypoint.min.js', array('jquery-custom'), null, true);
wp_enqueue_script('counterup', get_template_directory_uri() . '/vendor/counterup.min.js', array('jquery-custom'), null, true);
wp_enqueue_script('jquerycubeportfolio', get_template_directory_uri() . '/vendor/cubeportfolio/js/jquery.cubeportfolio.min.js', array('jquery'), null, true);
wp_enqueue_script('jqueryparallax', get_template_directory_uri() . '/vendor/jquery.parallax.min.js', array('jquery-custom'), null, true);
wp_enqueue_script('script-1', 'https://maps.googleapis.com/maps/api/js?key=AIzaSyAcXZw4zDsk-X3gPqETk5jnxXNnd1bJNkw', false, null, true);
wp_enqueue_script('jquerywow', get_template_directory_uri() . '/vendor/jquery.wow.min.js', array('jquery-custom'), null, true);
wp_enqueue_script('global', get_template_directory_uri() . '/js/global.min.js', array('jquery-custom'), null, true);
wp_enqueue_script('headersticky', get_template_directory_uri() . '/js/components/header-sticky.min.js', array('jquery-custom'), null, true);
wp_enqueue_script('scrollbar', get_template_directory_uri() . '/js/components/scrollbar.min.js', array('jquery-custom'), null, true);
wp_enqueue_script('magnificpopup', get_template_directory_uri() . '/js/components/magnific-popup.min.js', array('jquery-custom'), null, true);
wp_enqueue_script('swiper', get_template_directory_uri() . '/js/components/swiper.min.js', array('jquery-custom'), null, true);
wp_enqueue_script('counter', get_template_directory_uri() . '/js/components/counter.min.js', array('jquery-custom'), null, true);
wp_enqueue_script('portfoliocol', get_template_directory_uri() . '/js/components/portfolio-3-col.min.js', array('jquery-custom'), null, true);
wp_enqueue_script('parallax', get_template_directory_uri() . '/js/components/parallax.min.js', array('jquery-custom'), null, true);
wp_enqueue_script('googlemap', get_template_directory_uri() . '/js/components/google-map.min.js', array('jquery-custom'), null, true);
wp_enqueue_script('wow', get_template_directory_uri() . '/js/components/wow.min.js', array('jquery-custom'), null, true);
/* Enqueue Scripts End */
/* Enqueue Styles Begin */
wp_deregister_style('style-1');
wp_enqueue_style('style-1', 'https://fonts.googleapis.com/css?family=Lato:300,400,400i|Montserrat:400,700', false, null, 'all');
wp_deregister_style('bootstrap');
wp_enqueue_style('bootstrap', get_template_directory_uri() . '/vendor/bootstrap/css/bootstrap.min.css', false, null, 'all');
wp_deregister_style('animate');
wp_enqueue_style('animate', get_template_directory_uri() . '/css/animate.css', false, null, 'all');
wp_deregister_style('themify');
wp_enqueue_style('themify', get_template_directory_uri() . '/vendor/themify/themify.css', false, null, 'all');
wp_deregister_style('fontawesome');
wp_enqueue_style('fontawesome', get_template_directory_uri() . '/css/font-awesome.min.css', false, null, 'all');
wp_deregister_style('scrollbar');
wp_enqueue_style('scrollbar', get_template_directory_uri() . '/vendor/scrollbar/scrollbar.min.css', false, null, 'all');
wp_deregister_style('magnificpopup');
wp_enqueue_style('magnificpopup', get_template_directory_uri() . '/vendor/magnific-popup/magnific-popup.css', false, null, 'all');
wp_deregister_style('swiper');
wp_enqueue_style('swiper', get_template_directory_uri() . '/vendor/swiper/swiper.min.css', false, null, 'all');
wp_deregister_style('cubeportfolio');
wp_enqueue_style('cubeportfolio', get_template_directory_uri() . '/vendor/cubeportfolio/css/cubeportfolio.min.css', false, null, 'all');
wp_deregister_style('style');
wp_enqueue_style('style', get_template_directory_uri() . '/style.css', false, null, 'all');
wp_deregister_style('global');
wp_enqueue_style('global', get_template_directory_uri() . '/css/global/global.css', false, null, 'all');
wp_deregister_style('bumbeelbee-preloader');
wp_enqueue_style('bumbeelbee-preloader', get_template_directory_uri() . '/vendor/preloader/preloader.css', false, null, 'all');
/* Enqueue Styles End */
}
add_action('wp_enqueue_scripts', 'bumbeelbee_enqueue_scripts');
endif;
/*
* Resource files included by Pinegrow.
*/
/* Include Resources Begin */
// require_once "inc/blocks/wp_blocks.php";
/**
* Author setting
**/
if (!function_exists('bumbeelbee_posted_on')):
/**
* Prints HTML with meta information for the current post-date/time and author.
*/
function bumbeelbee_posted_on()
{
// Get the author name; wrap it in a link.
$byline = sprintf(
/* translators: %s: post author */
__('by %s', 'bumbeelbee'),
'' . get_the_author() . ''
);
// Finally, let's write all of this to the page.
echo '' . bumbeelbee_time_link() . ' ' . $byline . '';
}
endif;
if (!function_exists('bumbeelbee_time_link')):
/**
* Gets a nicely formatted string for the published date.
*/
function bumbeelbee_time_link()
{
$time_string = '';
if (get_the_time('U') !== get_the_modified_time('U')) {
$time_string = '';
}
$time_string = sprintf($time_string,
get_the_date(DATE_W3C),
get_the_date(),
get_the_modified_date(DATE_W3C),
get_the_modified_date()
);
// Wrap the time string in a link, and preface it with 'Posted on'.
return sprintf(
/* translators: %s: post date */
__('Posted on %s', 'bumbeelbee'),
'' . $time_string . ''
);
}
endif;
if (!function_exists('bumbeelbee_entry_header')):
/**
* Prints HTML with meta information for the categories, tags and comments.
*/
function bumbeelbee_entry_header()
{
/* translators: used between list items, there is a space after the comma */
$separate_meta = __(', ', 'bumbeelbee');
// Get Categories for posts.
$categories_list = get_the_category_list($separate_meta);
// Get Tags for posts.
$tags_list = get_the_tag_list('', $separate_meta);
// We don't want to output .entry-footer if it will be empty, so make sure its not.
if ((($categories_list) || $tags_list) || get_edit_post_link()) {
echo '
';
if ('post' === get_post_type()) {
if (($categories_list) || $tags_list) {
echo '';
// Make sure there's more than one category before displaying.
if ($categories_list) {
echo '' . '' . ' ' . '' . __('Categories', 'bumbeelbee') . '' . $categories_list . '';
}
if ($tags_list) {
echo '' . '' . ' ' . '' . __('Tags', 'bumbeelbee') . '' . $tags_list . '';
}
echo '';
}
}
echo '
';
}
}
endif;
/* Include Resources End */
/******************************************Menu Add class ********************
******************************************* ********************/
//add list class in menu
function bumbeelbee_add_menu_classes($classes, $item, $args, $depth)
{
$classes[] = 'bee-header-nav-menu-item';
return $classes;
}
add_filter('nav_menu_css_class', 'bumbeelbee_add_menu_classes', 10, 4);
//add anchor tag class
function add_link_atts($atts)
{
$atts['class'] = "bee-header-nav-menu-link bee-header-nav-menu-link-divider";
return $atts;
}
add_filter('nav_menu_link_attributes', 'add_link_atts');
function bumbeelbee_customize_wp_bootstrap_pagination($args)
{
$args['previous_string'] = '';
$args['next_string'] = '';
return $args;
}
add_filter('wp_bootstrap_pagination_defaults', 'bumbeelbee_customize_wp_bootstrap_pagination');
/**
* Shorten the string by number of word specified
* @param number $number number of words to be stripped
* @return string
*/
function bumbeelbee_content_short($number)
{
$words = explode(" ", strip_tags(get_the_content()));
$content = implode(" ", array_splice($words, 0, $number));
echo $content . '...';
}
if ( ! function_exists( 'bumbeelbee_featured_image_slider' ) ) :
/**
* display featured post slider
*/
function bumbeelbee_featured_image_slider() {
global $post;
?>
tag from content and excerpt
**/
/**
* Customizer additions.
*/
require_once get_template_directory() . '/include/customizer.php';
require_once "include/wp-bootstrap-pagination.php";
require_once dirname(__FILE__) . '/include/class-bumbeelbee-autoloader.php';
require_once dirname(__FILE__) . '/include/class-bumbeelbee-lite.php';
require_once dirname(__FILE__) . '/include/library/epsilon-framework/class-epsilon-autoloader.php';
$bumbeelbee = new bumbeelbee_Lite();