/** * Electrical Home Gadget functions and definitions * * @link https://developer.wordpress.org/themes/basics/theme-functions/ * * @package Electrical Home Gadget */ if ( ! defined( 'ELECTRONICS_APPLIANCES_URL' ) ) { define( 'ELECTRONICS_APPLIANCES_URL', esc_url( 'https://www.themagnifico.net/themes/home-tools-wordpress-theme/', 'electrical-home-gadget') ); } if ( ! defined( 'ELECTRONICS_APPLIANCES_TEXT' ) ) { define( 'ELECTRONICS_APPLIANCES_TEXT', __( 'Electrical Gadget Pro','electrical-home-gadget' )); } if ( ! defined( 'ELECTRONICS_APPLIANCES_CONTACT_SUPPORT' ) ) { define('ELECTRONICS_APPLIANCES_CONTACT_SUPPORT',__('https://wordpress.org/support/theme/electrical-home-gadget','electrical-home-gadget')); } if ( ! defined( 'ELECTRONICS_APPLIANCES_REVIEW' ) ) { define('ELECTRONICS_APPLIANCES_REVIEW',__('https://wordpress.org/support/theme/electrical-home-gadget/reviews/#new-post','electrical-home-gadget')); } if ( ! defined( 'ELECTRONICS_APPLIANCES_LIVE_DEMO' ) ) { define('ELECTRONICS_APPLIANCES_LIVE_DEMO',__('https://themagnifico.net/demo/electrical-home-gadget/','electrical-home-gadget')); } if ( ! defined( 'ELECTRONICS_APPLIANCES_GET_PREMIUM_PRO' ) ) { define('ELECTRONICS_APPLIANCES_GET_PREMIUM_PRO',__('https://www.themagnifico.net/themes/home-tools-wordpress-theme/','electrical-home-gadget')); } if ( ! defined( 'ELECTRONICS_APPLIANCES_PRO_DOC' ) ) { define('ELECTRONICS_APPLIANCES_PRO_DOC',__('https://www.themagnifico.net/eard/wathiqa/electrical-home-gadget-doc/','electrical-home-gadget')); } if ( ! defined( 'ELECTRONICS_APPLIANCES_BUY_TEXT' ) ) { define( 'ELECTRONICS_APPLIANCES_BUY_TEXT', __( 'Buy Electrical Gadget Pro','electrical-home-gadget' )); } function electrical_home_gadget_enqueue_styles() { $parentcss = 'electronics-appliances-style'; $theme = wp_get_theme(); wp_enqueue_style( $parentcss, get_template_directory_uri() . '/style.css', array(), $theme->parent()->get('Version')); wp_enqueue_style( 'electrical-home-gadget-style', get_stylesheet_uri(), array( $parentcss ), $theme->get('Version')); wp_enqueue_script( 'comment-reply', '/wp-includes/js/comment-reply.min.js', array(), false, true ); wp_enqueue_style( 'flatly-css', esc_url(get_template_directory_uri()) . '/assets/css/flatly.css'); } add_action( 'wp_enqueue_scripts', 'electrical_home_gadget_enqueue_styles' ); function electrical_home_gadget_store_admin_scripts() { // demo CSS wp_enqueue_style( 'electrical-home-gadget-store-demo-css', get_theme_file_uri( 'assets/css/demo.css' ) ); } add_action( 'admin_enqueue_scripts', 'electrical_home_gadget_store_admin_scripts' ); function electrical_home_gadget_customize_register($wp_customize){ $wp_customize->add_setting('electrical_home_gadget_product_short_heading',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('electrical_home_gadget_product_short_heading',array( 'label' => esc_html__('Title','electrical-home-gadget'), 'section' => 'electronics_appliances_recent_product', 'setting' => 'electrical_home_gadget_product_short_heading', 'type' => 'text' )); $wp_customize->add_setting('electrical_home_gadget_product_long_heading',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('electrical_home_gadget_product_long_heading',array( 'label' => esc_html__('Text','electrical-home-gadget'), 'section' => 'electronics_appliances_recent_product', 'setting' => 'electrical_home_gadget_product_long_heading', 'type' => 'text' )); } add_action('customize_register', 'electrical_home_gadget_customize_register'); if ( ! function_exists( 'electrical_home_gadget_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 electrical_home_gadget_setup() { add_theme_support( 'responsive-embeds' ); // 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