'; if ( is_day() ) : /* translators: %1$s %2$s: date */ printf( esc_html__( '%1$s %2$s', 'businessexpo' ), esc_html__( 'Archives', 'businessexpo' ), get_the_date() ); elseif ( is_month() ) : /* translators: %1$s %2$s: month */ printf( esc_html__( '%1$s %2$s', 'businessexpo' ), esc_html__( 'Archives', 'businessexpo' ), get_the_date( 'F Y' ) ); elseif ( is_year() ) : /* translators: %1$s %2$s: year */ printf( esc_html__( '%1$s %2$s', 'businessexpo' ), esc_html__( 'Archives', 'businessexpo' ), get_the_date( 'Y' ) ); elseif ( is_author() ) : /* translators: %1$s %2$s: author */ printf( esc_html__( '%1$s %2$s', 'businessexpo' ), esc_html__( 'All posts by', 'businessexpo' ), get_the_author() ); elseif ( is_category() ) : /* translators: %1$s %2$s: category */ printf( esc_html__( '%1$s %2$s', 'businessexpo' ), esc_html__( 'Category', 'businessexpo' ), single_cat_title( '', false ) ); elseif ( is_tag() ) : /* translators: %1$s %2$s: tag */ printf( esc_html__( '%1$s %2$s', 'businessexpo' ), esc_html__( 'Tag', 'businessexpo' ), single_tag_title( '', false ) ); elseif ( class_exists( 'WooCommerce' ) && is_shop() ) : /* translators: %1$s %2$s: WooCommerce */ printf( esc_html__( '%1$s %2$s', 'businessexpo' ), esc_html__( 'Shop', 'businessexpo' ), single_tag_title( '', false ) ); elseif ( is_archive() ) : the_archive_title( '

', '

' ); endif; echo ''; } elseif ( is_404() ) { echo '

'; /* translators: %1$s: 404 */ printf( esc_html__( '%1$s %2$s', 'businessexpo' ), esc_html__( 'Error 404', 'businessexpo' ) ); echo '

'; } elseif ( is_search() ) { echo '

'; /* translators: %1$s %2$s: search */ printf( esc_html__( '%1$s %2$s', 'businessexpo' ), esc_html__( 'Search results for', 'businessexpo' ), get_search_query() ); echo '

'; } else { echo '

' . esc_html( get_the_title() ) . '

'; } } /** * Theme Breadcrumbs Url */ function businessexpo_page_url() { $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; } /** * Theme Breadcrumbs */ if ( ! function_exists( 'businessexpo_page_header_breadcrumbs' ) ) : function businessexpo_page_header_breadcrumbs() { global $post; $homeLink = home_url(); echo ''; } endif; /** * Get sticky main menu class name **/ function businessexpo_sticky_main_menu_class() { $sticky_main_menu = get_theme_mod( 'businessexpo_menu_style', 'sticky' ); if ( $sticky_main_menu == 'sticky' ) { return 'site-menu-content--sticky'; } return ''; } /** * Check if admin bar is enabled **/ function businessexpo_is_admin_bar_enabled() { if ( is_admin_bar_showing() ) { return 'admin-bar-enabled'; } return ''; } /** * Check the device **/ function BusinessexpoisMobile() { return preg_match( '/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i', $_SERVER['HTTP_USER_AGENT'] ); } /** * Select sanitization callback */ function businessexpo_sanitize_select( $value ) { if ( is_array( $value ) ) { foreach ( $value as $key => $subvalue ) { $value[ $key ] = sanitize_text_field( $subvalue ); } return $value; } return sanitize_text_field( $value ); } /** * Custom CSS */ if ( ! function_exists( 'businessexpo_custom_customizer_options' ) ) : function businessexpo_custom_customizer_options() { $output_css = ''; // Page Header Image if ( has_header_image() ) : $output_css .= '.page-title-module { background: #17212c url(' . esc_url( get_header_image() ) . "); background-attachment: scroll; background-position: top center; background-repeat: no-repeat; background-size: cover; }\n"; endif; // Page Header color CSS $businessexpo_page_header_background_color = get_theme_mod( 'businessexpo_page_header_background_color', true ); $output_css .= '.page-title-module:before { background-color: ' . esc_attr( $businessexpo_page_header_background_color ) . "; }\n"; // if Page Header Disable (menu-top-margin) $businessexpo_menu_overlap = get_theme_mod( 'businessexpo_menu_overlap', true ); $businessexpo_page_header_disabled = get_theme_mod( 'businessexpo_page_header_disabled', true ); if ( $businessexpo_menu_overlap == true && $businessexpo_page_header_disabled != true ) : $output_css .= ".menu-overlap { margin-top: 8% !important; }\n"; endif; wp_add_inline_style( 'businessexpo-style', $output_css ); } endif; add_action( 'wp_enqueue_scripts', 'businessexpo_custom_customizer_options' ); add_action( 'after_switch_theme', 'businessexpo_import_theme_mods_from_child_themes_to_parent_theme' ); /** * Import theme mods */ function businessexpo_import_theme_mods_from_child_themes_to_parent_theme() { // Get the name of the previously active theme. $previous_theme = strtolower( get_option( 'theme_switched' ) ); if ( ! in_array( $previous_theme, array( 'BusinessExpo', 'Architect Designs', ) ) ) { return; } // Get the theme mods from the previous theme. $previous_theme_content = get_option( 'theme_mods_' . $previous_theme ); if ( ! empty( $previous_theme_content ) ) { foreach ( $previous_theme_content as $previous_theme_mod_k => $previous_theme_mod_v ) { set_theme_mod( $previous_theme_mod_k, $previous_theme_mod_v ); } } } /** * Admin notice */ class businessexpo_screen { public function __construct() { /* notice Lines*/ add_action( 'load-themes.php', array( $this, 'businessexpo_activation_admin_notice' ) ); } public function businessexpo_activation_admin_notice() { global $pagenow; if ( is_admin() && ( 'themes.php' == $pagenow ) ) { add_action( 'admin_notices', array( $this, 'businessexpo_admin_notice' ), 99 ); } } /** * Display an admin notice linking to the welcome screen * * @sfunctionse 1.8.2.4 */ public function businessexpo_admin_notice() { ?>
<?php esc_attr_e( 'Theme Screenshot', 'businessexpo' ); ?>

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

WpFrank Companion plugin, then enjoy this theme.', 'businessexpo' ) ); ?>

' . wp_get_theme()->get( 'Name' ) . '' ); ?> ', '', '' ); ?>
name; if ( 'BusinessExpo' == $activate_theme || 'Architect Designs' == $activate_theme ) { $GLOBALS['businessexpo_screen'] = new businessexpo_screen(); } /** * Plugin installer */ add_action( 'wp_ajax_install_act_plugin', 'businessexpo_admin_install_plugin' ); function businessexpo_admin_install_plugin() { /** * Install Plugin. */ include_once ABSPATH . '/wp-admin/includes/file.php'; include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; include_once ABSPATH . 'wp-admin/includes/plugin-install.php'; if ( ! file_exists( WP_PLUGIN_DIR . '/wpfrank-companion' ) ) { $api = plugins_api( 'plugin_information', array( 'slug' => sanitize_key( wp_unslash( 'wpfrank-companion' ) ), 'fields' => array( 'sections' => false, ), ) ); $skin = new WP_Ajax_Upgrader_Skin(); $upgrader = new Plugin_Upgrader( $skin ); $result = $upgrader->install( $api->download_link ); } // Activate plugin. if ( current_user_can( 'activate_plugin' ) ) { $result = activate_plugin( 'wpfrank-companion/wpfrank-companion.php' ); } } ?>