%1$s

', esc_html( $message ) ); } if ( version_compare( PHP_VERSION, '5.3.29' ) < 0 ) { /** * Add notice for PHP upgrade. */ add_filter( 'template_include', '__return_null', 99 ); switch_theme( WP_DEFAULT_THEME ); unset( $_GET['activated'] ); add_action( 'admin_notices', 'hestia_no_support_5_3' ); return; } /** * Begins execution of the theme core. * * Since everything within the plugin is registered via hooks, * then kicking off the plugin from this point in the file does * not affect the page life cycle. * * @since 1.0.0 */ function hestia_run() { require_once HESTIA_CORE_DIR . 'class-hestia-autoloader.php'; $autoloader = new Hestia_Autoloader(); spl_autoload_register( array( $autoloader, 'loader' ) ); new Hestia_Core(); $vendor_file = trailingslashit( get_template_directory() ) . 'vendor/autoload.php'; if ( is_readable( $vendor_file ) ) { require_once $vendor_file; } add_filter( 'themeisle_sdk_products', 'hestia_load_sdk' ); } /** * Loads products array. * * @param array $products All products. * * @return array Products array. */ function hestia_load_sdk( $products ) { $products[] = get_template_directory() . '/style.css'; return $products; } require_once( HESTIA_CORE_DIR . 'class-hestia-autoloader.php' ); /** * The start of the app. * * @since 1.0.0 */ hestia_run(); /** * Append theme name to the upgrade link * If the active theme is child theme of Hestia * * @param string $link - Current link. * * @return string $link - New upgrade link. * @package hestia * @since 1.1.75 */ function hestia_upgrade_link( $link ) { $theme_name = wp_get_theme()->get_stylesheet(); $hestia_child_themes = array( 'orfeo', 'fagri', 'tiny-hestia', 'christmas-hestia', 'jinsy-magazine', ); if ( $theme_name === 'hestia' ) { return $link; } if ( ! in_array( $theme_name, $hestia_child_themes ) ) { return $link; } $link = add_query_arg( array( 'theme' => $theme_name, ), $link ); return $link; } add_filter( 'hestia_upgrade_link_from_child_theme_filter', 'hestia_upgrade_link' ); /** * Check if $no_seconds have passed since theme was activated. * Used to perform certain actions, like displaying upsells or add a new recommended action in About Hestia page. * * @param integer $no_seconds number of seconds. * * @return bool * @since 1.1.45 * @access public */ function hestia_check_passed_time( $no_seconds ) { $activation_time = get_option( 'hestia_time_activated' ); if ( ! empty( $activation_time ) ) { $current_time = time(); $time_difference = (int) $no_seconds; if ( $current_time >= $activation_time + $time_difference ) { return true; } else { return false; } } return true; } /** * Legacy code function. */ function hestia_setup_theme() { return; }