250, 'width' => 250, 'flex-width' => true, 'flex-height' => true, ) ); add_theme_support( 'custom-background', apply_filters( 'basic_starter_dev_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', 'style', 'script', 'navigation-widgets', ) ); register_nav_menus( array( 'menu-1' => esc_html__( 'Primary', 'basic-starter-dev' ), 'footer' => esc_html__( 'Footer Menu', 'basic-starter-dev' ), ) ); // Load editor styles add_editor_style( 'editor-style.css' ); } add_action( 'after_setup_theme', 'basic_starter_dev_setup' ); function basic_starter_register_block_styles() { register_block_style( 'core/image', array( 'name' => 'fancy-border', 'label' => __( 'Fancy Border', 'basic-starter-dev' ), 'inline_style' => '.is-style-fancy-border { border: 5px double #000; padding: 10px; }', ) ); register_block_pattern( 'basic-starter-dev/hero-text', array( 'title' => __( 'Hero Text Section', 'basic-starter-dev' ), 'description' => _x( 'A centered hero section with text.', 'Block pattern description', 'basic-starter-dev' ), 'content' => "

" . esc_html__('Welcome to Our Website!', 'basic-starter-dev') . "

", ) ); } add_action( 'init', 'basic_starter_register_block_styles' ); /** * Set the content width */ function basic_starter_dev_content_width() { $GLOBALS['content_width'] = apply_filters( 'basic_starter_dev_content_width', 640 ); } add_action( 'after_setup_theme', 'basic_starter_dev_content_width', 0 ); /** * Register widget area */ function basic_starter_dev_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar', 'basic-starter-dev' ), 'id' => 'sidebar-1', 'description' => esc_html__( 'Add widgets here.', 'basic-starter-dev' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'basic_starter_dev_widgets_init' ); /** * Enqueue scripts and styles */ function basic_starter_dev_scripts() { wp_enqueue_style( 'basic-starter-dev-style', get_stylesheet_uri(), array(), _S_VERSION ); wp_style_add_data( 'basic-starter-dev-style', 'rtl', 'replace' ); wp_enqueue_script( 'basic-starter-dev-navigation', get_template_directory_uri() . '/js/navigation.js', array(), _S_VERSION, true ); // Customizer live preview if ( is_customize_preview() ) { wp_enqueue_script( 'basic-starter-dev-customizer', get_template_directory_uri() . '/js/customizer.js', array( 'jquery', 'customize-preview' ), _S_VERSION, true ); } if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'basic_starter_dev_scripts' ); /** * Include theme files */ require get_template_directory() . '/inc/custom-header.php'; require get_template_directory() . '/inc/template-tags.php'; require get_template_directory() . '/inc/template-functions.php'; require get_template_directory() . '/inc/customizer.php'; if ( defined( 'JETPACK__VERSION' ) ) { require get_template_directory() . '/inc/jetpack.php'; }