/home/edulekha/sriramaaresorts.com/wp-content/themes/getleads/functions.php
<?php
/**
* theme's main functions and globally usable variables, contants etc
* added: v1.0
* textdomain: getleads, class: GETLEADS, var: $getleads_, constants: GETLEADS_, function: getleads_
*/
// shorthand contants
// ------------------------------------------------------------------------
define('GETLEADS_THEME', 'GetLeads WordPress Theme');
define('GETLEADS_VERSION', '2.5.0');
define('GETLEADS_MINWP_VERSION', '6.0');
// shorthand contants for theme assets url
// ------------------------------------------------------------------------
define('GETLEADS_THEME_URI', get_template_directory_uri());
define('GETLEADS_IMG', GETLEADS_THEME_URI . '/assets/images');
define('GETLEADS_CSS', GETLEADS_THEME_URI . '/assets/css');
define('GETLEADS_JS', GETLEADS_THEME_URI . '/assets/js');
// shorthand contants for theme assets directory path
// ----------------------------------------------------------------------------------------
define('GETLEADS_THEME_DIR', get_template_directory());
define('GETLEADS_IMG_DIR', GETLEADS_THEME_DIR . '/assets/images');
define('GETLEADS_CSS_DIR', GETLEADS_THEME_DIR . '/assets/css');
define('GETLEADS_JS_DIR', GETLEADS_THEME_DIR . '/assets/js');
define('GETLEADS_CORE', GETLEADS_THEME_DIR . '/core');
define('GETLEADS_COMPONENTS', GETLEADS_THEME_DIR . '/components');
define('GETLEADS_EDITOR', GETLEADS_COMPONENTS . '/editor');
define('GETLEADS_EDITOR_ELEMENTOR', GETLEADS_EDITOR . '/elementor');
define('GETLEADS_EDITOR_GUTENBERG', GETLEADS_EDITOR . '/gutenberg');
define('GETLEADS_SHORTCODE_DIR_STYLE', GETLEADS_EDITOR_ELEMENTOR . '/widgets/style');
define('GETLEADS_SHORTCODE_DIR_WIDGETS', GETLEADS_EDITOR_ELEMENTOR . '/widgets');
define('GETLEADS_INSTALLATION', GETLEADS_CORE . '/installation-fragments');
define('GETLEADS_REMOTE_CONTENT', esc_url('http://content.xpeedstudio.com/demo-content/getleads'));
define('GETLEADS_LIVE_URL', esc_url('https://demo.xpeedstudio.com/getleads'));
define('GETLEADS_GLOBAL_DEVMONSTA', esc_url( 'https://demo.xpeedstudio.com/global-plugin' ) );
// set up the content width value based on the theme's design
// ----------------------------------------------------------------------------------------
if (!isset($content_width)) {
$content_width = 800;
}
// set up theme default and register various supported features.
// ----------------------------------------------------------------------------------------
function getleads_setup() {
// make the theme available for translation
$lang_dir = GETLEADS_THEME_DIR . '/languages';
load_theme_textdomain('getleads', $lang_dir);
// add support for post formats
add_theme_support('post-formats', [
'standard', 'image', 'video', 'audio','gallery'
]);
// add support for automatic feed links
add_theme_support('automatic-feed-links');
// let WordPress manage the document title
add_theme_support('title-tag');
// add support for post thumbnails
add_theme_support('post-thumbnails');
// hard crop center center
set_post_thumbnail_size(750, 465, ['center', 'center']);
add_image_size( 'getleads-small', 350, 250, ['center', 'center'] );
add_image_size( 'getleads-large', 1110, 740, ['center', 'center'] );
add_image_size( 'getleads-case-study-box', 320, 200, ['center', 'center'] );
// register navigation menus
register_nav_menus(
[
'primary' => esc_html__('Primary Menu', 'getleads'),
'footermenu' => esc_html__('Footer Menu', 'getleads'),
]
);
// woocomemrce support
if ( class_exists( 'WooCommerce', false ) ) {
add_theme_support('woocommerce');
add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );
}
// HTML5 markup support for search form, comment form, and comments
add_theme_support('html5', array(
'search-form', 'comment-form', 'comment-list', 'gallery', 'caption'
));
/*
* Enable support for wide alignment class for Gutenberg blocks.
*/
add_theme_support( 'align-wide' );
add_theme_support( 'editor-styles' );
add_theme_support( 'wp-block-styles' );
}
add_action('after_setup_theme', 'getleads_setup');
add_action('enqueue_block_editor_assets', 'getleads_action_enqueue_block_editor_assets' );
function getleads_action_enqueue_block_editor_assets() {
wp_enqueue_style( 'getleads-fonts', getleads_google_fonts_url(['Poppins:300,400,500,600,700&display=swap', 'Roboto:300,400,500,700']), null, GETLEADS_VERSION );
wp_enqueue_style( 'getleads-gutenberg-editor-font-awesome-styles', GETLEADS_CSS . '/font-awesome.css', null, GETLEADS_VERSION );
wp_enqueue_style( 'getleads-gutenberg-editor-customizer-styles', GETLEADS_CSS . '/gutenberg-editor-custom.css', null, GETLEADS_VERSION );
wp_enqueue_style( 'getleads-gutenberg-editor-styles', GETLEADS_CSS . '/gutenberg-custom.css', null, GETLEADS_VERSION );
wp_enqueue_style( 'getleads-gutenberg-blog-styles', GETLEADS_CSS . '/blog.css', null, GETLEADS_VERSION );
}
// hooks for unyson framework
// ----------------------------------------------------------------------------------------
function getleads_framework_customizations_path($rel_path) {
return '/components';
}
add_filter('fw_framework_customizations_dir_rel_path', 'getleads_framework_customizations_path');
function getleads_remove_fw_settings() {
remove_submenu_page( 'themes.php', 'fw-settings' );
}
add_action( 'admin_menu', 'getleads_remove_fw_settings', 999 );
// include the init.php
// ----------------------------------------------------------------------------------------
require_once( GETLEADS_CORE . '/init.php');
require_once( GETLEADS_COMPONENTS . '/editor/elementor/elementor.php');
add_filter('elementskit/license/hide_banner', function(){
return true;
});