$method();
}
}
}
/**
* Loads sidebars and widgets
*/
public function init_sidebars() {
new bumbeelbee_Sidebars();
}
/**
* Load Hooks
*/
public function init_hooks() {
new bumbeelbee_Hooks();
}
/**
* Initiate the setting helper
*/
public function customize_register_init() {
// new bumbeelbee_Customizer_Helper();
}
/**
* Initiate epsilon framework
*/
public function init_epsilon() {
$args = array(
'controls' => array( 'slider', 'toggle', 'typography', 'upsell', 'color-scheme' ),
'sections' => array( 'pro', 'recommended-actions' ),
'path' => '/include/library'
);
new Epsilon_Framework( $args );
/**
* Instantiate the object
*/
$options = array(
'bumbeelbee_headings_typography',
'bumbeelbee_paragraphs_typography'
);
$handler = 'bumbeelbee-stylesheet';
Epsilon_Typography::get_instance( $options, $handler );
}
/**
* Initiate the welcome screen
*/
public function init_welcome_screen() {
// Welcome screen
if ( is_admin() ) {
global $bumbeelbee_required_actions, $bumbeelbee_recommended_plugins;
$bumbeelbee_recommended_plugins = array(
'custom-post-type-ui' => array( 'recommended' => true, 'plugin-file' => 'custom-post-type-ui.php' ),
'advanced-custom-fields' => array( 'recommended' => true, 'plugin-file' => 'acf.php' ),
'accesspress-social-share' => array( 'recommended' => true, 'plugin-file' => 'accesspress-social-share.php' ),
);
/*
* id - unique id; required
* title
* description
* check - check for plugins (if installed)
* plugin_slug - the plugin's slug (used for installing the plugin)
*
*/
$bumbeelbee_required_actions = array(
array(
"id" => 'bumbeelbee-req-ac-install-wp-import-plugin',
"title" => bumbeelbee_Notify_System::wordpress_importer_title(),
"description" => bumbeelbee_Notify_System::wordpress_importer_description(),
"check" => bumbeelbee_Notify_System::has_import_plugin( 'wordpress-importer' ),
"plugin_slug" => 'wordpress-importer'
),
array(
"id" => 'bumbeelbee-req-ac-install-wp-import-widget-plugin',
"title" => bumbeelbee_Notify_System::widget_importer_exporter_title(),
'description' => bumbeelbee_Notify_System::widget_importer_exporter_description(),
"check" => bumbeelbee_Notify_System::has_import_plugin( 'widget-importer-exporter' ),
"plugin_slug" => 'widget-importer-exporter'
),
array(
"id" => 'bumbeelbee-req-ac-download-data',
"title" => esc_html__( 'Download theme sample data', 'bumbeelbee' ),
"description" => esc_html__( 'Head over to our website and download the sample content data.', 'bumbeelbee' ),
"help" => '' . __( 'Posts', 'bumbeelbee' ) . ',
' . __( 'Widgets', 'bumbeelbee' ) . ',' . __( ' Advanced Custom Fields', 'bumbeelbee' ) . '',
"check" => bumbeelbee_Notify_System::has_content(),
),
array(
"id" => 'bumbeelbee-req-ac-install-data',
"title" => esc_html__( 'Import Sample Data', 'bumbeelbee' ),
"help" => '' . __( 'Import Posts', 'bumbeelbee' ) . '
' . __( 'Import Widgets', 'bumbeelbee' ) . '',
"check" => bumbeelbee_Notify_System::has_import_plugins(),
),
array(
"id" => 'bumbeelbee-req-ac-static-latest-news',
"title" => esc_html__( 'Set front page to static', 'bumbeelbee' ),
"description" => esc_html__( 'If you just installed bumbeelbee, and are not able to see the front-page demo, you need to go to Settings -> Reading , Front page displays and select "Static Page".', 'bumbeelbee' ),
"help" => 'If you need more help understanding how this works, check out the following link.
' . __( 'Set manually', 'bumbeelbee' ) . ' ' . __( 'Set automatically', 'bumbeelbee' ) . '',
"check" => bumbeelbee_Notify_System::is_not_static_page()
)
);
new Bumbeelbee_Welcome_Screen();
}
}
/**
* Register Scripts and Styles for the theme
*/
public function enqueues() {
$bumbeelbee = wp_get_theme();
/**
* Load Google Fonts
*/
wp_enqueue_style( 'bumbeelbee-fonts', '//fonts.googleapis.com/css?family=Lato:100,300,400,700,900|Poppins:400,500,600,700', array(), $bumbeelbee['Version'], 'all' );
$preloader = get_theme_mod( 'bumbeelbee_preloader_effect', false );
$preloader_accent = get_theme_mod( 'bumbeelbee_preloader_effect_type', false );
if ( $preloader && strtolower( $preloader_accent ) !== '#ff3d2e' ) {
$css = '.loader {
border-top:1px solid ' . bumbeelbee_Helper::adjust_brightness( $preloader_accent, 100 ) . ';
border-right:1px solid ' . bumbeelbee_Helper::adjust_brightness( $preloader_accent, 100 ) . ';
border-bottom:1px solid ' . bumbeelbee_Helper::adjust_brightness( $preloader_accent, 100 ) . ';
border-left:1px solid ' . $preloader_accent . ';
}';
wp_add_inline_style( 'bumbeelbee-preloader', $css );
}
wp_localize_script( 'bumbeelbee-functions', 'WPUrls', array(
'siteurl' => get_option( 'siteurl' ),
'theme' => get_template_directory_uri(),
'ajaxurl' => admin_url( 'admin-ajax.php' )
) );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
/**
* Admin enqueues
*/
public function admin_enqueues() {
$bumbeelbee = wp_get_theme();
wp_enqueue_style( 'bumbeelbee-fonts', 'https://fonts.googleapis.com/css?family=Lato:100,300,400,700,900|Poppins:400,500,600,700', array(), $bumbeelbee['Version'], 'all' );
wp_enqueue_style( 'bumbeelbee-lite-welcome-screen', get_template_directory_uri() . '//include/library/welcome-screen/assets/css/welcome.css', array(), '123123' );
wp_enqueue_script( 'bumbeelbee-lite-welcome-screen', get_template_directory_uri() . '//include/library/welcome-screen/assets/js/welcome.js', array( 'jquery', 'jquery-ui-slider' ), '112323123' );
}
/**
* Editor styles
*/
public function editor_enqueues() {
add_editor_style( 'assets/css/custom-editor-style.css' );
}
/**
* bumbeelbee Theme Setup
*/
public function theme_setup() {
load_theme_textdomain( 'bumbeelbee', get_template_directory() . '/languages' );
add_theme_support( 'automatic-feed-links' );
/**
* Add theme support for custom header
*/
add_theme_support( 'custom-header', array(
'width' => 1920,
'height' => 200,
'uploads' => true,
) );
add_theme_support( 'title-tag' );
add_theme_support( 'post-formats', array(
'aside',
'image',
'quote',
'link',
'gallery',
'video',
'status',
'audio',
'chat',
) );
register_nav_menus( array(
'primary' => esc_html__( 'Primary', 'bumbeelbee' ),
'social' => esc_html__( 'Social', 'bumbeelbee' ),
'copyright' => esc_html__( 'Copyright', 'bumbeelbee' ),
) );
add_theme_support( 'html5', array(
'search-form',
'comment-form',
'comment-list',
'gallery',
'caption',
) );
add_theme_support( 'post-thumbnails' );
add_image_size( 'bumbeelbee-single-post', 730, 330, true );
add_image_size( 'bumbeelbee-recent-post-big', 560, 416, true );
add_image_size( 'bumbeelbee-post-horizontal', 350, 260, true );
add_image_size( 'bumbeelbee-vertical-post', 255, 195, true );
add_image_size( 'bumbeelbee-post-grid', 360, 270, true );
add_image_size( 'bumbeelbee-post-grid-small', 275, 210, true );
add_image_size( 'bumbeelbee-recent-post-list-image', 65, 65, true );
add_image_size( 'bumbeelbee-slider-image', 1920, 600, true );
add_theme_support( 'custom-logo', array(
'height' => 90,
'width' => 300,
'flex-width' => true,
) );
add_theme_support( 'custom-background', apply_filters( 'bumbeelbee_custom_background_args', array(
'default-color' => 'ffffff',
'default-image' => '',
) ) );
add_theme_support( 'customize-selective-refresh-widgets' );
// Add theme support for Infinite Scroll.
add_theme_support( 'infinite-scroll', array(
'container' => 'main',
'footer' => 'page',
) );
// Add theme support for Responsive Videos.
add_theme_support( 'jetpack-responsive-videos' );
}
/**
* Content width
*/
public function content_width() {
if ( ! isset( $GLOBALS['content_width'] ) ) {
$GLOBALS['content_width'] = 600;
}
}
}