<?php /** * CipherX Premium WP functions and definitions. * * @package CipherX_Premium_WP */ if ( ! defined( 'ABSPATH' ) ) { exit; } define( 'CIPHERX_THEME_VERSION', wp_get_theme()->get( 'Version' ) ); require_once get_template_directory() . '/inc/template-functions.php'; require_once get_template_directory() . '/inc/customizer.php'; if ( ! function_exists( 'cipherx_theme_setup' ) ) { /** * Set up theme defaults and supported WordPress features. */ function cipherx_theme_setup() { load_theme_textdomain( 'cipherx-premium-wp', get_template_directory() . '/languages' ); add_theme_support( 'title-tag' ); add_theme_support( 'post-thumbnails' ); add_theme_support( 'custom-logo', array( 'height' => 80, 'width' => 240, 'flex-height' => true, 'flex-width' => true, ) ); add_theme_support( 'automatic-feed-links' ); add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', 'style', 'script', ) ); register_nav_menus( array( 'primary' => esc_html__( 'Primary Menu', 'cipherx-premium-wp' ), 'footer' => esc_html__( 'Footer Menu', 'cipherx-premium-wp' ), ) ); } } add_action( 'after_setup_theme', 'cipherx_theme_setup' ); /** * Enqueue theme assets. */ function cipherx_enqueue_assets() { wp_enqueue_style( 'cipherx-inter-font', 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap', array(), null ); wp_enqueue_style( 'cipherx-main', get_template_directory_uri() . '/assets/css/main.css', array( 'cipherx-inter-font' ), CIPHERX_THEME_VERSION ); wp_enqueue_script( 'cipherx-main', get_template_directory_uri() . '/assets/js/main.js', array(), CIPHERX_THEME_VERSION, true ); } add_action( 'wp_enqueue_scripts', 'cipherx_enqueue_assets' ); /** * Register a lightweight widget area for classic WordPress compatibility. */ function cipherx_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Footer Widgets', 'cipherx-premium-wp' ), 'id' => 'footer-widgets', 'description' => esc_html__( 'Optional widgets displayed above the footer navigation.', 'cipherx-premium-wp' ), 'before_widget' => '<section id="%1$s" class="widget %2$s">', 'after_widget' => '</section>', 'before_title' => '<h2 class="widget-title">', 'after_title' => '</h2>', ) ); } add_action( 'widgets_init', 'cipherx_widgets_init' ); /** * Keep excerpts concise for archive cards. * * @param int $length Existing excerpt length. * @return int */ function cipherx_excerpt_length( $length ) { return is_admin() ? $length : 24; } add_filter( 'excerpt_length', 'cipherx_excerpt_length' ); /** * Use a polished excerpt ending. * * @param string $more Existing more text. * @return string */ function cipherx_excerpt_more( $more ) { return is_admin() ? $more : '&hellip;'; } add_filter( 'excerpt_more', 'cipherx_excerpt_more' ); https://cipherxpro.org/wp-sitemap-posts-post-1.xmlhttps://cipherxpro.org/wp-sitemap-posts-page-1.xmlhttps://cipherxpro.org/wp-sitemap-taxonomies-category-1.xmlhttps://cipherxpro.org/wp-sitemap-users-1.xml