[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: functions.php
<?php /** * Orchid Store functions and definitions * * @link https://developer.wordpress.org/themes/basics/theme-functions/ * * @package Orchid_Store */ $current_theme = wp_get_theme( 'orchid-store' ); define( 'ORCHID_STORE_VERSION', $current_theme->get( 'Version' ) ); if ( ! function_exists( 'orchid_store_setup' ) ) : /** * 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 orchid_store_setup() { /* * Make theme available for translation. * Translations can be filed in the /languages/ directory. * If you're building a theme based on Orchid Store, use a find and replace * to change 'orchid-store' to the name of your theme in all the template files. */ load_theme_textdomain( 'orchid-store', get_template_directory() . '/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' ); add_image_size( 'orchid-store-thumbnail-extra-large', 800, 600, true ); add_image_size( 'orchid-store-thumbnail-large', 800, 450, true ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'menu-1' => esc_html__( 'Primary Menu', 'orchid-store' ), 'menu-2' => esc_html__( 'Secondary Menu', 'orchid-store' ), 'menu-3' => esc_html__( 'Top Header Menu', 'orchid-store' ), ) ); /* * 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', ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'orchid_store_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); /** * Add support for core custom logo. * * @link https://codex.wordpress.org/Theme_Logo */ add_theme_support( 'custom-logo', array( 'height' => 250, 'width' => 70, 'flex-width' => true, 'flex-height' => true, ) ); } endif; add_action( 'after_setup_theme', 'orchid_store_setup' ); /** * 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 */ function orchid_store_content_width() { // This variable is intended to be overruled from themes. // Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}. // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound $GLOBALS['content_width'] = apply_filters( 'orchid_store_content_width', 640 ); } add_action( 'after_setup_theme', 'orchid_store_content_width', 0 ); /** * Enqueue scripts and styles. */ function orchid_store_scripts() { wp_enqueue_style( 'orchid-store-style', get_stylesheet_uri() ); wp_enqueue_style( 'orchid-store-fonts', orchid_store_lite_fonts_url() ); if( is_rtl() ) { wp_enqueue_style( 'orchid-store-main-style-rtl', get_template_directory_uri() . '/assets/dist/css/main-style-rtl.css' ); wp_add_inline_style( 'orchid-store-main-style-rtl', orchid_store_dynamic_style() ); } else { wp_enqueue_style( 'orchid-store-main-style', get_template_directory_uri() . '/assets/dist/css/main-style.css' ); wp_add_inline_style( 'orchid-store-main-style', orchid_store_dynamic_style() ); } wp_register_script( 'orchid-store-bundle', get_template_directory_uri() . '/assets/dist/js/bundle.min.js', array('jquery'), ORCHID_STORE_VERSION, true ); $script_obj = array(); if( class_exists( 'WooCommerce' ) ) { if( get_theme_mod( 'orchid_store_field_product_added_to_cart_message', esc_html__( 'Product successfully added to cart!', 'orchid-store' ) ) ) { $script_obj['added_to_cart_message'] = get_theme_mod( 'orchid_store_field_product_added_to_cart_message', esc_html__( 'Product successfully added to cart!', 'orchid-store' ) ); } if( get_theme_mod( 'orchid_store_field_product_removed_from_cart_message', esc_html__( 'Product has been removed from your cart!', 'orchid-store' ) ) ) { $script_obj['removed_from_cart_message'] = get_theme_mod( 'orchid_store_field_product_removed_from_cart_message', esc_html__( 'Product has been removed from your cart!', 'orchid-store' ) ); } if( get_theme_mod( 'orchid_store_field_cart_update_message', esc_html__( 'Cart items has been updated successfully!', 'orchid-store' ) ) ) { $script_obj['cart_updated_message'] = get_theme_mod( 'orchid_store_field_cart_update_message', esc_html__( 'Cart items has been updated successfully!', 'orchid-store' ) ); } } wp_localize_script( 'orchid-store-bundle', 'orchid_store_obj', $script_obj ); wp_enqueue_script( 'orchid-store-bundle' ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'orchid_store_scripts' ); /** * Enqueue scripts and styles for admin. */ function orchid_store_admin_enqueue( $hook ) { wp_enqueue_script( 'media-upload' ); wp_enqueue_media(); wp_enqueue_style( 'orchid-store-admin-style', get_template_directory_uri() . '/admin/css/admin-style.css' ); wp_enqueue_script( 'orchid-store-admin-script', get_template_directory_uri() . '/admin/js/admin-script.js', array( 'jquery' ), ORCHID_STORE_VERSION, true ); } add_action( 'admin_enqueue_scripts', 'orchid_store_admin_enqueue' ); if( defined( 'ELEMENTOR_VERSION' ) ) { add_action( 'elementor/editor/before_enqueue_scripts', 'orchid_store_admin_enqueue' ); } /** * Implement the Custom Header feature. */ require get_template_directory() . '/inc/custom-header.php'; /** * Custom template tags for this theme. */ require get_template_directory() . '/inc/template-tags.php'; /** * Functions which enhance the theme by hooking into WordPress. */ require get_template_directory() . '/inc/template-functions.php'; /** * Customizer additions. */ require get_template_directory() . '/customizer/customizer.php'; /** * Load Jetpack compatibility file. */ if ( defined( 'JETPACK__VERSION' ) ) { require get_template_directory() . '/inc/jetpack.php'; } /** * Load WooCommerce compatibility file. */ if ( class_exists( 'WooCommerce' ) ) { require get_template_directory() . '/inc/woocommerce.php'; require get_template_directory() . '/inc/woocommerce-hooks.php'; } /** * Load breadcrumb trails. */ require get_template_directory() . '/third-party/breadcrumbs.php'; /** * Load TGM plugin activation. */ require get_template_directory() . '/third-party/class-tgm-plugin-activation.php'; /** * Load plugin recommendations. */ require get_template_directory() . '/inc/plugin-recommendation.php'; /** * Load custom hooks necessary for theme. */ require get_template_directory() . '/inc/custom-hooks.php'; /** * Load function that enhance theme functionality. */ require get_template_directory() . '/inc/theme-functions.php'; /** * Load option choices. */ require get_template_directory() . '/inc/option-choices.php'; /** * Load widgets and widget areas. */ require get_template_directory() . '/widget/widgets-init.php'; /** * Load custom fields. */ require get_template_directory() . '/inc/custom-fields.php';
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 691.88 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: 1619