'; $html .= '

' . get_bloginfo('name') . '

'; $html .= ''; $description = get_bloginfo( 'description', 'display' ); if ( $description || is_customize_preview() ) { $html .= '

'.$description.'

'; } } echo wp_kses_post( $html ); } endif; /************************************************** **** About Functions ***************************************************/ if ( ! function_exists( 'businesswp_about_layout1' ) ) : function businesswp_about_layout1(){ $section = 'about'; $button_text = businesswp_get_option($section.'_button_text'); $button_url = businesswp_get_option($section.'_button_url'); $section_content = businesswp_get_option($section.'_content'); $section_featured_image = businesswp_get_option($section.'_featured_image'); ?>

$item) { $title = ! empty( $item->title ) ? apply_filters( 'businesswp_translate_single_string', $item->title, 'Service section' ) : ''; $text = ! empty( $item->text ) ? apply_filters( 'businesswp_translate_single_string', $item->text, 'Service section' ) : ''; $icon = ! empty( $item->icon_value ) ? $item->icon_value : ''; $link = ! empty( $item->link ) ? apply_filters( 'businesswp_translate_single_string', $item->link, 'Service section' ) : ''; ?>

$item) { $title = ! empty( $item->title ) ? apply_filters( 'businesswp_translate_single_string', $item->title, 'Service section' ) : ''; $text = ! empty( $item->text ) ? apply_filters( 'businesswp_translate_single_string', $item->text, 'Service section' ) : ''; $icon = ! empty( $item->icon_value ) ? $item->icon_value : ''; $link = ! empty( $item->link ) ? apply_filters( 'businesswp_translate_single_string', $item->link, 'Service section' ) : ''; ?>
$item) { $title = ! empty( $item->title ) ? apply_filters( 'businesswp_translate_single_string', $item->title, 'Service section' ) : ''; $text = ! empty( $item->text ) ? apply_filters( 'businesswp_translate_single_string', $item->text, 'Service section' ) : ''; $icon = ! empty( $item->icon_value ) ? $item->icon_value : ''; $link = ! empty( $item->link ) ? apply_filters( 'businesswp_translate_single_string', $item->link, 'Service section' ) : ''; ?>
$item) { $title = ! empty( $item->title ) ? apply_filters( 'businesswp_translate_single_string', $item->title, 'Counter section' ) : ''; $text = ! empty( $item->text ) ? apply_filters( 'businesswp_translate_single_string', $item->text, 'Counter section' ) : ''; $icon = ! empty( $item->icon_value ) ? $item->icon_value : ''; ?>

$item) { $title = ! empty( $item->title ) ? apply_filters( 'businesswp_translate_single_string', $item->title, 'Counter section' ) : ''; $text = ! empty( $item->text ) ? apply_filters( 'businesswp_translate_single_string', $item->text, 'Counter section' ) : ''; $icon = ! empty( $item->icon_value ) ? $item->icon_value : ''; ?>

$item) { $title = ! empty( $item->title ) ? apply_filters( 'businesswp_translate_single_string', $item->title, 'Counter section' ) : ''; $text = ! empty( $item->text ) ? apply_filters( 'businesswp_translate_single_string', $item->text, 'Counter section' ) : ''; $icon = ! empty( $item->icon_value ) ? $item->icon_value : ''; ?>

$item) { $icon = ! empty( $item->icon_value ) ? $item->icon_value : ''; $title = ! empty( $item->title ) ? apply_filters( 'businesswp_translate_single_string', $item->title, 'Pricing section' ) : ''; $text = ! empty( $item->text ) ? apply_filters( 'businesswp_translate_single_string', $item->text, 'Pricing section' ) : ''; $button_text = ! empty( $item->button_text ) ? apply_filters( 'businesswp_translate_single_string', $item->button_text, 'Pricing section' ) : ''; $link = ! empty( $item->link ) ? apply_filters( 'businesswp_translate_single_string', $item->link, 'Pricing section' ) : ''; $checkbox_val = ! empty( $item->checkbox_val ) ? $item->checkbox_val : false; $currency = ! empty( $item->currency ) ? $item->currency : ''; $price = ! empty( $item->price ) ? $item->price : ''; $price_time = ! empty( $item->price_time ) ? apply_filters( 'businesswp_translate_single_string', $item->price_time, 'Pricing section' ) : ''; $featured = ! empty( $item->featured ) ? $item->featured : false; ?>
">

>
$item) { $title = ! empty( $item->title ) ? apply_filters( 'businesswp_translate_single_string', $item->title, 'Pricing section' ) : ''; $text = ! empty( $item->text ) ? apply_filters( 'businesswp_translate_single_string', $item->text, 'Pricing section' ) : ''; $button_text = ! empty( $item->button_text ) ? apply_filters( 'businesswp_translate_single_string', $item->button_text, 'Pricing section' ) : ''; $link = ! empty( $item->link ) ? apply_filters( 'businesswp_translate_single_string', $item->link, 'Pricing section' ) : ''; $checkbox_val = ! empty( $item->checkbox_val ) ? $item->checkbox_val : false; $currency = ! empty( $item->currency ) ? $item->currency : ''; $price = ! empty( $item->price ) ? $item->price : ''; $price_time = ! empty( $item->price_time ) ? apply_filters( 'businesswp_translate_single_string', $item->price_time, 'Pricing section' ) : ''; $featured = ! empty( $item->featured ) ? $item->featured : false; ?>

>
$item) { $title = ! empty( $item->title ) ? apply_filters( 'businesswp_translate_single_string', $item->title, 'Testimonial section' ) : ''; $designation = ! empty( $item->designation ) ? apply_filters( 'businesswp_translate_single_string', $item->designation, 'Testimonial section' ) : ''; $text = ! empty( $item->text ) ? apply_filters( 'businesswp_translate_single_string', $item->text, 'Testimonial section' ) : ''; ?>
<?php echo esc_attr($title); ?>

/
$item) { $title = ! empty( $item->title ) ? apply_filters( 'businesswp_translate_single_string', $item->title, 'Testimonial section' ) : ''; $designation = ! empty( $item->designation ) ? apply_filters( 'businesswp_translate_single_string', $item->designation, 'Testimonial section' ) : ''; $text = ! empty( $item->text ) ? apply_filters( 'businesswp_translate_single_string', $item->text, 'Testimonial section' ) : ''; ?>

<?php echo esc_attr($title); ?>
/
<?php echo esc_attr(get_the_author_link());?>

$item) { $title = ! empty( $item->title ) ? apply_filters( 'businesswp_translate_single_string', $item->title, 'Team section' ) : ''; $designation = ! empty( $item->designation ) ? apply_filters( 'businesswp_translate_single_string', $item->designation, 'Team section' ) : ''; $text = ! empty( $item->text ) ? apply_filters( 'businesswp_translate_single_string', $item->text, 'Team section' ) : ''; $link = ! empty( $item->link ) ? apply_filters( 'businesswp_translate_single_string', $item->link, 'Team section' ) : '#'; ?>
$item) { $title = ! empty( $item->title ) ? apply_filters( 'businesswp_translate_single_string', $item->title, 'Team section' ) : ''; $designation = ! empty( $item->designation ) ? apply_filters( 'businesswp_translate_single_string', $item->designation, 'Team section' ) : ''; $text = ! empty( $item->text ) ? apply_filters( 'businesswp_translate_single_string', $item->text, 'Team section' ) : ''; $link = ! empty( $item->link ) ? apply_filters( 'businesswp_translate_single_string', $item->link, 'Team section' ) : '#'; ?>
$item) { $icon = ! empty( $item->icon_value ) ? $item->icon_value : ''; $title = ! empty( $item->title ) ? apply_filters( 'businesswp_translate_single_string', $item->title, 'Contact section' ) : ''; $text = ! empty( $item->text ) ? apply_filters( 'businesswp_translate_single_string', $item->text, 'Contact section' ) : ''; ?>

$item) { $icon = ! empty( $item->icon_value ) ? $item->icon_value : ''; $title = ! empty( $item->title ) ? apply_filters( 'businesswp_translate_single_string', $item->title, 'Contact section' ) : ''; $text = ! empty( $item->text ) ? apply_filters( 'businesswp_translate_single_string', $item->text, 'Contact section' ) : ''; ?>

$item) { $icon = ! empty( $item->icon_value ) ? $item->icon_value : ''; $title = ! empty( $item->title ) ? apply_filters( 'businesswp_translate_single_string', $item->title, 'Contact section' ) : ''; $text = ! empty( $item->text ) ? apply_filters( 'businesswp_translate_single_string', $item->text, 'Contact section' ) : ''; ?>

', '' ); endif; }elseif( is_404() ){ /* translators: %1$s: 404 */ printf( esc_html__( 'Error: %1$s', 'businesswp' ) , esc_html__('404','businesswp') ); }elseif( is_search() ){ /* translators: %1$s %2$s: search */ printf( esc_html__( '%1$s %2$s', 'businesswp' ), esc_html__('Search results for','businesswp'), get_search_query() ); } else { echo esc_html( get_the_title() ); } } endif; /************************************************** **** CurpageURL Functions ***************************************************/ if ( ! function_exists( 'businesswp_curPageURL' ) ) : function businesswp_curPageURL() { $page_url = 'http'; if ( key_exists("HTTPS", $_SERVER) && ( $_SERVER["HTTPS"] == "on" ) ){ $page_url .= "s"; } $page_url .= "://"; if ($_SERVER["SERVER_PORT"] != "80") { $page_url .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; } else { $page_url .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; } return $page_url; } endif; /************************************************** **** Menu Search Icon ***************************************************/ if ( ! function_exists( 'businesswp_menu_search_icon' ) ) : add_filter( 'wp_nav_menu_items', 'businesswp_menu_search_icon', 10, 2 ); function businesswp_menu_search_icon( $nav, $args ) { $search_icon = businesswp_get_option('nav_search_show'); $form = sprintf(__('
','businesswp'), esc_url( home_url( '/' ) ), esc_attr_x( 'Search …', 'placeholder', 'businesswp' ), get_search_query() ); if ( $search_icon && 'primary' === $args->theme_location ) { return sprintf(__('%1$s','businesswp'), $nav, $form ); } return $nav; } endif; /************************************************** **** Menus Custom Button ***************************************************/ if ( ! function_exists( 'businesswp_menu_custom_button' ) ) : add_filter( 'wp_nav_menu_items', 'businesswp_menu_custom_button', 10, 2 ); function businesswp_menu_custom_button( $nav, $args ) { $is_btn = businesswp_get_option('nav_custom_btn'); $label = businesswp_get_option('nav_custom_btn_label'); $url = businesswp_get_option('nav_custom_btn_url'); if ( $is_btn && 'primary' === $args->theme_location ) { return $nav . ''; } return $nav; } endif; /************************************************** **** Get Sidebar Layout ***************************************************/ if ( ! function_exists( 'businesswp_get_sidebar_layout' ) ) : function businesswp_get_sidebar_layout() { $sidebar_layout = businesswp_get_option( 'sidebar_layout' ); // For single page template if ( is_single() ) { $sidebar_layout = businesswp_get_option( 'sidebar_single_layout' ); } // For singular page template if ( is_singular() ) { $meta = get_post_meta( get_the_ID(), '_businesswp-sidebar-layout-meta', true ); if ( $meta ) { $sidebar_layout = $meta; } } // For archive page template if ( is_home() || is_archive() || is_search() || is_tax() ) { $sidebar_layout = businesswp_get_option( 'sidebar_blog_layout' ); } // woocommerce if( class_exists('woocommerce') ){ if ( is_woocommerce() || is_shop() || is_cart() || is_product() || is_checkout() || is_account_page() ) { $sidebar_layout = 'right-sidebar'; } } return apply_filters( 'Businesswp_sidebar_layout', $sidebar_layout ); } endif; /************************************************** **** Get Content Area Classes ***************************************************/ if ( ! function_exists( 'businesswp_get_content_area_classes' ) ) : function businesswp_get_content_area_classes(){ $sidebar_layout = businesswp_get_sidebar_layout(); $class = ''; if($sidebar_layout=='left-sidebar' || $sidebar_layout=='right-sidebar'){ $class = 'col-lg-8 col-md-8 col-sm-8'; }else if($sidebar_layout=='no-sidebar'){ $class = 'col-lg-12 col-md-12 col-sm-12'; }else{ $class = 'col-lg-6 col-md-6 col-sm-6'; } if($sidebar_layout=='both-left'){ $class .= ' order-3'; }else if($sidebar_layout=='both-right'){ $class .= ' order-1'; }else if($sidebar_layout=='both-sidebars'){ $class .= ' order-2'; } return $class; } endif; /************************************************** **** Get Right Sidebar Classes ***************************************************/ if ( ! function_exists( 'businesswp_get_right_sidebar_classes' ) ) : function businesswp_get_right_sidebar_classes(){ $sidebar_layout = businesswp_get_sidebar_layout(); $class = ''; if($sidebar_layout=='left-sidebar' || $sidebar_layout=='right-sidebar'){ $class = 'col-lg-4 col-md-4 col-sm-4'; }else{ $class = 'col-lg-3 col-md-3 col-sm-3'; } if($sidebar_layout=='both-left'){ $class .= ' order-2'; }else if($sidebar_layout=='both-right'){ $class .= ' order-3'; }else if($sidebar_layout=='both-sidebars'){ $class .= ' order-1'; } return $class; } endif; /************************************************** **** Get Left Sidebar Classes ***************************************************/ if ( ! function_exists( 'businesswp_get_left_sidebar_classes' ) ) : function businesswp_get_left_sidebar_classes(){ $sidebar_layout = businesswp_get_sidebar_layout(); $class = ''; if($sidebar_layout=='left-sidebar' || $sidebar_layout=='right-sidebar'){ $class = 'col-lg-4 col-md-4 col-sm-4'; }else{ $class = 'col-lg-3 col-md-3 col-sm-3'; } if($sidebar_layout=='both-left'){ $class .= ' order-1'; }else if($sidebar_layout=='both-right'){ $class .= ' order-2'; }else if($sidebar_layout=='both-sidebars'){ $class .= ' order-3'; } return $class; } endif; /************************************************** **** Get Option ***************************************************/ if(!function_exists('businesswp_get_option')): function businesswp_get_option( $key = 'top_header_show' ){ $option = wp_parse_args( get_option( 'businesswp_option', array() ), businesswp_theme_default_data() ); return $option[$key]; } endif; /************************************************** **** Frontpage Section Header ***************************************************/ if(!function_exists('businesswp_frontpage_section_header')): function businesswp_frontpage_section_header($sub_title='',$subtitle_color='',$title='',$title_color='',$description='',$description_color='',$divider_show=false,$divider_type='divider div-transparent',$divider_width='w-30'){ ?>
>

>

>

array( 'sidebar' => array( 'search', 'categories', 'tag', 'meta', ), 'footer-1' => array( 'my_text' => array( 'text', array( 'title' => _x('About US', 'My text starter contents', 'businesswp'), 'text' => _x('Lorem ipsum dolor sit amet consectetur dipisicing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua Ut enim ad minim veniam.', 'My text starter contents', 'businesswp') ) ) ), 'footer-2' => array( 'search' => array( 'search', array( 'title' => _x( 'search', 'My text starter contents', 'businesswp' ), ) ), ), 'footer-3' => array( 'categories'=> array( 'categories', array( 'title' => _x( 'categories', 'My text starter contents', 'businesswp' ), ) ), ), 'footer-4' => array( 'calendar'=> array( 'calendar', array( 'title' => _x( 'calendar', 'My text starter contents', 'businesswp' ), ) ), ), 'sidebar-2' => array( 'my_text' => array( 'text', array( 'title' => _x('About US', 'My text starter contents', 'businesswp'), 'text' => _x('Lorem ipsum dolor sit amet consectetur dipisicing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua Ut enim ad minim veniam.', 'My text starter contents', 'businesswp'), ), ), ), ), 'posts' => array( 'home', 'about', 'contact', 'blog', ), 'options' => array( 'show_on_front' => 'page', 'page_on_front' => '{{home}}', 'page_for_posts' => '{{blog}}', 'header_image' => '', ), 'nav_menus' => array( 'primary' => array( 'name' => __( 'Primary Menu', 'businesswp' ), 'items' => array( 'link_home', 'page_about', 'page_blog', 'page_contact', 'page_loremuipsum' => array( 'type' => 'post_type', 'object' => 'page', 'object_id' => '{{loremipsum}}', ), ), ), ), ); return apply_filters( 'businesswp_wp_starter_pack', $starter_content ); } endif; /************************************************** **** Edit Link ***************************************************/ if ( ! function_exists( 'businesswp_edit_link' ) ) : function businesswp_edit_link() { edit_post_link( sprintf( /* translators: %s: Post title. */ __( 'Edit "%s"', 'businesswp' ), get_the_title() ), '', '' ); } endif; /************************************************** **** Edit Post Link ***************************************************/ if ( ! function_exists( 'businesswp_edit_post_link' ) ) : function businesswp_edit_post_link( $link, $post_id, $text ) { if ( is_admin() ) { return $link; } $edit_url = get_edit_post_link( $post_id ); if ( ! $edit_url ) { return; } $text = sprintf( wp_kses( /* translators: %s: Post title. Only visible to screen readers. */ __( 'Edit %s', 'businesswp' ), array( 'span' => array( 'class' => array(), ), ) ), get_the_title( $post_id ) ); return '
' . $text . '
'; } add_filter( 'edit_post_link', 'businesswp_edit_post_link', 10, 3 ); endif; /************************************************** **** Filter Wp List Pages item Class ***************************************************/ if ( ! function_exists( 'businesswp_filter_wp_list_pages_item_classes' ) ) : function businesswp_filter_wp_list_pages_item_classes( $css_class, $page, $depth, $args, $current_page ) { // Only apply to wp_list_pages() calls with match_menu_classes set to true. $match_menu_classes = isset( $args['match_menu_classes'] ); if ( ! $match_menu_classes ) { return $css_class; } // Add current menu item class. if ( in_array( 'current_page_item', $css_class, true ) ) { $css_class[] = 'current-menu-item'; } // Add menu item has children class. if ( in_array( 'page_item_has_children', $css_class, true ) ) { $css_class[] = 'menu-item-has-children'; } return $css_class; } add_filter( 'page_css_class', 'businesswp_filter_wp_list_pages_item_classes', 10, 5); endif; /************************************************** **** Add Sub Toggles to Main Menu ***************************************************/ if ( ! function_exists( 'businesswp_add_sub_toggles_to_main_menu' ) ) : function businesswp_add_sub_toggles_to_main_menu( $args, $item, $depth ) { // Add sub menu toggles to the Expanded Menu with toggles. if ( isset( $args->show_toggles ) && $args->show_toggles ) { // Wrap the menu item link contents in a div, used for positioning. $args->before = '
'; $args->after = ''; // Add a toggle to items with children. if ( in_array( 'menu-item-has-children', $item->classes, true ) ) { $toggle_target_string = '.menu-modal .menu-item-' . $item->ID . ' > .sub-menus'; $toggle_duration = businesswp_toggle_duration(); // Add the sub menu toggle. $args->after .= ''; } // Close the wrapper. $args->after .= '
'; // Add sub menu icons to the primary menu without toggles. } elseif ( 'primary' === $args->theme_location || 'secondary' === $args->theme_location ) { if ( in_array( 'menu-item-has-children', $item->classes, true ) ) { $args->after = ''; } else { $args->after = ''; } } return $args; } add_filter( 'nav_menu_item_args', 'businesswp_add_sub_toggles_to_main_menu', 10, 3 ); endif; /************************************************** **** Toggle Duration ***************************************************/ if ( ! function_exists( 'businesswp_toggle_duration' ) ) : function businesswp_toggle_duration() { $duration = apply_filters( 'businesswp_toggle_duration', 250 ); return $duration; } endif; // Get started notice // AJAX handler to store the state of dismissible notices function businesswp_ajax_notice_handler() { if ( isset( $_POST['type'] ) ) { // Pick up the notice "type" - passed via jQuery (the "data-notice" attribute on the notice) $type = sanitize_text_field( wp_unslash( $_POST['type'] ) ); // Update it in the options update_option( 'dismissed-' . $type, TRUE ); } } add_action( 'wp_ajax_businesswp_dismissed_notice_handler', 'businesswp_ajax_notice_handler' ); function businesswp_deprecated_hook_admin_notice() { // Check if it's been dismissed... if ( ! get_option('dismissed-get_started', FALSE ) ) { // Added the class "notice-get-started-class" so jQuery pick it up and pass via AJAX, // and added "data-notice" attribute in order to track multiple / different notices // multiple dismissible notice states ?>
<?php esc_attr_e( 'Theme Screenshot', 'businesswp' ); ?>

'. wp_get_theme()->get('Name'). '' ); ?>

Britetechs Companion plugin, then enjoy this theme.', 'businesswp')) ?>

'. wp_get_theme()->get('Name'). '' ); ?> ', '', '' ); ?>
sanitize_key( wp_unslash( 'britetechs-companion' ) ), 'fields' => array( 'sections' => false, ), ) ); $skin = new WP_Ajax_Upgrader_Skin(); $upgrader = new Plugin_Upgrader( $skin ); $result = $upgrader->install( $api->download_link ); } // Activate the theme plugin if ( current_user_can( 'activate_plugin' ) ) { $result = activate_plugin( 'britetechs-companion/britetechs-companion.php' ); } } add_action( 'wp_ajax_install_act_plugin', 'businesswp_admin_install_plugin' ); // Enqueue admin scripts and styles function businesswp_admin_enqueue_scripts(){ wp_enqueue_style('businesswp-admin-style', get_template_directory_uri() . '/css/admin/admin.css'); wp_enqueue_script( 'businesswp-admin-script', get_template_directory_uri() . '/js/businesswp-admin-script.js', array( 'jquery' ), '', true ); wp_localize_script( 'businesswp-admin-script', 'businesswp_ajax_object', array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) ); } add_action( 'admin_enqueue_scripts', 'businesswp_admin_enqueue_scripts' ); // String translation function businesswp_pll_string_register_helper( string $theme_mod = '', bool $default = false, string $name = '' ) { if ( ! function_exists( 'pll_register_string' ) ) { return; } $option = wp_parse_args( get_option( 'businesswp_option', array() ), businesswp_theme_default_data() ); $repeater_content = $option[$theme_mod]; $repeater_content = json_decode( $repeater_content ); if ( ! empty( $repeater_content ) ) { foreach ( $repeater_content as $repeater_item ) { foreach ( $repeater_item as $field_name => $field_value ) { if( $field_name == 'content_align' || $field_name == 'image_url' || $field_name == 'currency' || $field_name == 'price' || $field_name == 'icon_value' ){ continue; } if ( $field_value !== 'undefined' ) { if ( $field_name === 'social_repeater' ) { $social_repeater_value = json_decode( $field_value ); if ( ! empty( $social_repeater_value ) ) { foreach ( $social_repeater_value as $social ) { foreach ( $social as $key => $value ) { if ( $key === 'link' ) { pll_register_string( 'Social link', $value, $name ); } if ( $key === 'icon' ) { pll_register_string( 'Social icon', $value, $name ); } } } } } else { if ( $field_name !== 'id' ) { $f_n = ucfirst( $field_name ); pll_register_string( $f_n, $field_value, $name ); } } } } } } } function businesswp_register_strings() { businesswp_pll_string_register_helper( 'slider_content', $default = false, 'Slider section' ); businesswp_pll_string_register_helper( 'service_content', $default = false, 'Service section' ); businesswp_pll_string_register_helper( 'testimonial_content', $default = false, 'Testimonial section' ); businesswp_pll_string_register_helper( 'team_content', $default = false, 'Team section' ); businesswp_pll_string_register_helper( 'contact_content', $default = false, 'Contact section' ); businesswp_pll_string_register_helper( 'portfolio_content', $default = false, 'Portfolio section' ); } add_action( 'after_setup_theme', 'businesswp_register_strings', 30 ); function businesswp_translate_single_string( $original_value, $domain ) { if ( is_customize_preview() ) { $wpml_translation = $original_value; } else { $wpml_translation = apply_filters( 'wpml_translate_single_string', $original_value, $domain, $original_value ); if ( $wpml_translation === $original_value && function_exists( 'pll__' ) ) { return pll__( $original_value ); } } return $wpml_translation; } add_filter( 'businesswp_translate_single_string', 'businesswp_translate_single_string', 10, 2 );