| Server IP : 69.30.224.78 / Your IP : 216.73.216.48 Web Server : Microsoft-IIS/10.0 System : Windows NT SERVER 10.0 build 14393 (Windows Server 2016) AMD64 User : IWPD_92(newtechtest) ( 0) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Inetpub/vhosts/newtechtest.in/heartcare.newtechtest.in/wp-content/themes/savior/ |
Upload File : |
<?php
/**
* Savior functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package Savior
*/
/**
* Define Constants.
*/
define( 'SAVIOR_THEME_VER', wp_get_theme()->get( 'Version' ) );
define( 'SAVIOR_THEME_DIR', get_template_directory() );
define( 'SAVIOR_THEME_URI', get_template_directory_uri() );
define( 'SAVIOR_SUPPORT_URL', 'https://support.sagetheme.com' );
define( 'SAVIOR_DOCS_URL', 'https://savior.sagetheme.com/docs' );
/**
* Sets up theme defaults and registers support for various WordPress features.
*
* Note that this function is hooked into the after_setup_theme hook, which
* runs before the init hook. The init hook is too late for some features, such
* as indicating support for post thumbnails.
*/
function savior_theme_support() {
/*
* Set the content width in pixels, based on the theme's design and stylesheet.
*
* Priority 0 to make it available to lower priority callbacks.
*
* @global int $content_width
*/
$GLOBALS['content_width'] = apply_filters( 'savior_content_width', 780 );
/*
* Make theme available for translation.
* Translations can be filed in the /languages/ directory.
* If you're building a theme based on Savior, use a find and replace
* to change 'savior' to the name of your theme in all the template files.
*/
load_theme_textdomain( 'savior', SAVIOR_THEME_DIR . '/languages' );
// Add default posts and comments RSS feed links to head.
add_theme_support( 'automatic-feed-links' );
/*
* Let WordPress manage the document title.
* By adding theme support, we declare that this theme does not use a
* hard-coded <title> tag in the document head, and expect WordPress to
* provide it for us.
*/
add_theme_support( 'title-tag' );
/*
* Enable support for Post Thumbnails on posts and pages.
*
* @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
*/
add_theme_support( 'post-thumbnails' );
// Set post thumbnail size.
set_post_thumbnail_size( 680, 9999 );
// Enable support for common post formats
add_theme_support( 'post-formats', array( 'quote', 'video', 'audio', 'gallery', 'link' ) );
// This theme uses wp_nav_menu() in one location.
register_nav_menus( array(
'primary' => esc_html__( 'Primary Menu', 'savior' ),
'mobile' => esc_html__( 'Mobile Menu', 'savior' ),
'footer' => esc_html__( 'Footer Menu', 'savior' ),
) );
/*
* 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',
) );
// Add theme support for selective refresh for widgets.
add_theme_support( 'customize-selective-refresh-widgets' );
// Add support for Block Styles.
add_theme_support( 'wp-block-styles' );
// Add support for full and wide align images.
add_theme_support( 'align-wide' );
// Add support for editor styles.
add_theme_support( 'editor-styles' );
// Enqueue editor styles.
add_editor_style( array( 'assets/css/style-editor.css', 'assets/css/savior-icons.css', savior_google_fonts() ) );
// Add support for responsive embedded content.
add_theme_support( 'responsive-embeds' );
// Add support for font sizes
add_theme_support( 'editor-font-sizes', array(
array(
'name' => esc_html__( 'Small', 'savior' ),
'shortName' => esc_html__( 'S', 'savior' ),
'size' => 12,
'slug' => 'small',
),
array(
'name' => esc_html__( 'Normal', 'savior' ),
'shortName' => esc_html__( 'N', 'savior' ),
'size' => 18,
'slug' => 'normal',
),
array(
'name' => esc_html__( 'Medium', 'savior' ),
'shortName' => esc_html__( 'M', 'savior' ),
'size' => 24,
'slug' => 'medium',
),
array(
'name' => esc_html__( 'Large', 'savior' ),
'shortName' => esc_html__( 'L', 'savior' ),
'size' => 40,
'slug' => 'large',
),
array(
'name' => esc_html__( 'Huge', 'savior' ),
'shortName' => esc_html__( 'XL', 'savior' ),
'size' => 64,
'slug' => 'huge',
),
) );
// Add image sizes.
add_image_size( 'savior-post-thumbnail-grid', 680, 460, true );
add_image_size( 'savior-post-thumbnail-navigation', 100, 68, true );
add_image_size( 'savior-post-thumbnail-shortcode', 450, 300, true );
}
add_action( 'after_setup_theme', 'savior_theme_support' );
require SAVIOR_THEME_DIR . '/inc/helpers.php';
require SAVIOR_THEME_DIR . '/inc/class-tgm-plugin-activation.php';
require SAVIOR_THEME_DIR . '/inc/class-backend.php';
require SAVIOR_THEME_DIR . '/inc/class-options.php';
require SAVIOR_THEME_DIR . '/inc/class-frontend.php';
require SAVIOR_THEME_DIR . '/inc/class-menu-walker.php';
require SAVIOR_THEME_DIR . '/inc/class-give.php';
require SAVIOR_THEME_DIR . '/inc/class-tribe-events.php';
require SAVIOR_THEME_DIR . '/inc/class-woocommerce.php';
if ( defined( 'JETPACK__VERSION' ) ) {
require SAVIOR_THEME_DIR . '/inc/jetpack.php';
}