get('Version'), 'all'); // Enqueue the core version of jQuery wp_enqueue_script('jquery'); // Enqueue Bootstrap Bundle JS wp_enqueue_script('arcs_bootstrap_js', get_template_directory_uri() . '/assets/js/bootstrap.bundle.js', array('jquery'), '5.3.0', true); // Enqueue dynamic styles wp_enqueue_style('arcs_dynamic_styles', get_template_directory_uri() . '/inc/dynamic-styles.php', array(), wp_get_theme()->get('Version')); // Enqueue other scripts wp_enqueue_script('arcs_main_js', get_template_directory_uri() . '/assets/js/main.js', array('jquery'), '1.0', true); // Enqueue editor styles add_editor_style(get_stylesheet_directory_uri() . '/assets/css/editor-style.css'); // Enqueue block editor styles wp_enqueue_style('arcs_block_editor_styles', get_template_directory_uri() . '/assets/css/block-editor-styles.css', false, '1.0', 'all'); } add_action('wp_enqueue_scripts', 'arcs_enqueue_styles_and_scripts'); // Define a unique post meta function arcs_add_custom_post_meta($post_id, $meta_key, $meta_value) { add_post_meta($post_id, '_arcs_' . $meta_key, $meta_value, true); } // Define a unique option function arcs_set_custom_option($option_name, $option_value) { update_option('arcs_' . $option_name, $option_value); } // Define a constant with a unique prefix define('ARCS_THEME_VERSION', '1.0.0'); // Add custom image size add_image_size('arcs_thumbnail', 800, 600, true); // Register custom block pattern category register_block_pattern_category('arcs_custom_category', array('label' => __('Custom Category', 'arcs'))); // Use wp_script_add_data with a prefixed key wp_script_add_data('arcs_bootstrap_js', 'defer', true); //==============================================================theme suport================================================= // Theme Support Function function arcs_setup() { // Load theme text domain for translation load_theme_textdomain('arcs', get_template_directory() . '/languages'); // Add default posts and comments RSS feed links to head add_theme_support('automatic-feed-links'); // Enable support for post thumbnails and featured images add_theme_support('post-thumbnails'); // Add support for custom logo add_theme_support('custom-logo'); // Register navigation menus register_nav_menus(array( 'primary' => __('Primary Menu', 'arcs'), // Primary menu location 'footer' => __('Footer Menu', 'arcs'), // Footer menu location )); // Enable support for HTML5 markup add_theme_support('html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', )); // Add theme support for title tag add_theme_support('title-tag'); // Add custom image size for home featured images add_image_size('home-featured', 680, 300, array('center', 'center')); // Add support for block styles add_theme_support('wp-block-styles'); // Add support for responsive embedded content add_theme_support('responsive-embeds'); // Add support for wide and full alignments add_theme_support('align-wide'); // Custom background support (color and image) add_theme_support('custom-background', apply_filters('arcs_custom_background_args', array( 'default-color' => 'ffffff', // Default background color 'default-image' => '', // Default background image 'default-repeat' => 'no-repeat', // Default background repeat 'default-position-x' => 'center', // Default background position 'default-attachment' => 'fixed', // Default background attachment 'wp-head-callback' => '_custom_background_cb', // Callback to output styles ))); } add_action('after_setup_theme', 'arcs_setup'); //==============================================================Include============================================================ // Include custom walker class require_once get_template_directory() . '/inc/class-arcs-walker-nav-menu.php'; // Include dynamic styles require get_template_directory() . '/inc/dynamic-styles.php'; // Include widget file // require get_template_directory() . '/inc/widget.php'; require get_template_directory() . '/inc/class-my-custom-widget.php'; // banner require get_template_directory() . '/inc/customizer.php'; // If customizer settings are in a separate file // Include footer custom style require get_template_directory() . '/inc/footer-custom-style.php'; // Include Google Fonts require get_template_directory() . '/inc/body-fonts.php'; // Adjust the path as needed require get_template_directory() . '/inc/heading-font.php'; //button require get_template_directory() . '/inc/custom-button.php'; //input require get_template_directory() . '/inc/custom-input.php'; //walkers require get_template_directory() . '/inc/walkers.php'; //block-patterns require get_template_directory() . '/inc/block-patterns.php'; //=============================================================header=========================================================== // Register navigation menus function arcs_register_menus() { register_nav_menus(array( 'primary' => __('Primary Menu', 'arcs'), )); } add_action('init', 'arcs_register_menus'); // Add theme support for custom logo and other features function arcs_theme_support() { add_theme_support('custom-logo'); // Add more theme supports as needed } add_action('after_setup_theme', 'arcs_theme_support'); function arcs_theme_setup() { // Add support for custom header add_theme_support('custom-header', array( 'default-image' => get_template_directory_uri() . '/images/default-header.jpg', 'width' => 1920, 'height' => 1080, 'flex-height' => true, 'flex-width' => true, 'header-text' => false, )); // Other theme setup functions... } add_action('after_setup_theme', 'arcs_theme_setup'); //=============================================================comment-reply=================================================== // Enqueue theme styles and scripts function arcs_enqueue_scripts() { // Enqueue stylesheets and scripts // Example: // wp_enqueue_style('main-style', get_stylesheet_uri()); // wp_enqueue_script('main-script', get_template_directory_uri() . '/js/main.js', array('jquery'), null, true); } add_action('wp_enqueue_scripts', 'arcs_enqueue_scripts'); // Enqueue comment-reply script function arcs_enqueue_comment_reply_script() { if (is_singular() && comments_open()) { wp_enqueue_script('comment-reply'); } } add_action('wp_enqueue_scripts', 'arcs_enqueue_comment_reply_script'); // Other theme functions //================================================================block_styles========================================================== function arcs_register_block_styles() { // Register a custom style for the paragraph block register_block_style( 'core/paragraph', array( 'name' => 'custom-paragraph-style', 'label' => __('Custom Paragraph Style', 'arcs'), 'inline_style' => '.wp-block-paragraph.is-style-custom-paragraph-style { font-style: italic; color: #0073aa; }', ) ); // Register a custom style for the button block register_block_style( 'core/button', array( 'name' => 'custom-button-style', 'label' => __('Custom Button Style', 'arcs'), 'inline_style' => '.wp-block-button.is-style-custom-button-style .wp-block-button__link { background-color: #0073aa; color: white; border-radius: 10px; }', ) ); } add_action('init', 'arcs_register_block_styles'); //============================================================widget================================================================== //widget function arcs_widgets_init() { register_sidebar(array( 'name' => __('Primary Sidebar', 'arcs'), 'id' => 'main-sidebar', 'description' => 'Main Sidebar on Right Side', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => __('Footer widget 1', 'arcs'), 'id' => 'footer-1', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => __('Footer widget 2', 'arcs'), 'id' => 'footer-2', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => __('Footer widget 3', 'arcs'), 'id' => 'footer-3', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); } add_action('widgets_init', 'arcs_widgets_init'); //===================================================================================================================================