600, 'gallery_thumbnail_image_width' => 300, 'single_image_width' => 600, ) ); add_theme_support( 'wc-product-gallery-lightbox' ); add_theme_support( 'wc-product-gallery-slider' ); set_post_thumbnail_size(750, 465, ['center', 'center']); add_image_size( 'cafesio_two_column', 350, 228, [ 'center', 'center' ] ); add_image_size( 'cafesio_one_column', 730, 475, [ 'center', 'center' ] ); add_image_size( 'cafesio_sidebar_img', 70, 70, true ); register_nav_menus( array( 'primary' => esc_html__( 'Primary', 'cafesio' ), 'footer_menu' => esc_html__( 'Footer nav', 'cafesio' ), ) ); add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', ) ); add_editor_style(); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'cafesio_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); add_theme_support( 'customize-selective-refresh-widgets' ); add_theme_support( 'custom-logo', array( 'height' => 250, 'width' => 250, 'flex-width' => true, 'flex-height' => true, ) ); } endif; add_action( 'after_setup_theme', 'cafesio_setup' ); function cafesio_content_width() { $GLOBALS['content_width'] = apply_filters( 'cafesio_content_width', 800 ); // phpcs:ignore WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound } add_action( 'after_setup_theme', 'cafesio_content_width', 0 ); add_action('enqueue_block_editor_assets', 'cafesio_action_enqueue_block_editor_assets' ); function cafesio_action_enqueue_block_editor_assets() { // google fonts for block editor only wp_enqueue_style( 'cafesio-fonts', Cafesio_Google_Fonts::cafesio_google_fonts_url(['Open Sans:300,300i,400,400i,600,600i,700,700i,800,800i', 'Cookie:400', 'Lato:100,100i,300,300i,400,400i,700,700i,900,900i', 'Playfair Display:400,400i,500,500i,600,600i,700,700i,800,800i,900,900i']), null, CAFESIO_VERSION ); wp_enqueue_style( 'cafesio-gutenberg-editor-font-awesome-styles', CAFESIO_CSS . '/font-awesome.css', null, CAFESIO_VERSION ); wp_enqueue_style( 'cafesio-gutenberg-editor-customizer-styles', CAFESIO_CSS . '/gutenberg-editor-custom.css', null, CAFESIO_VERSION ); wp_enqueue_style( 'cafesio-gutenberg-blog-styles', CAFESIO_CSS . '/blog.css', null, CAFESIO_VERSION ); } /** * Implement global function. */ require get_template_directory() . '/inc/helpers/global.php'; /** * Implement the Custom Header feature. */ require get_template_directory() . '/inc/custom-header.php'; /** * Custom template tags for this theme. */ /** * widgets for this theme. */ require get_template_directory() . '/inc/hooks/widget-areas.php'; /** * Functions which enhance the theme by hooking into WordPress. */ require get_template_directory() . '/inc/template-functions.php'; require_once( CAFESIO_COMPONENTS . '/editor/elementor/elementor.php'); /** * Customizer additions. */ /** * helpers. */ require get_template_directory() . '/inc/helpers/cafesio-google-fonts.php'; require get_template_directory() . '/inc/hooks/blog.php'; require get_template_directory() . '/inc/hooks/menus.php'; /** * assets enqueues. */ require get_template_directory() . '/inc/hooks/enqueues/admin/static.php'; require get_template_directory() . '/inc/hooks/enqueues/frontend/static.php'; require get_template_directory() . '/inc/hooks/enqueues/frontend/dynamic.php'; // setup related files require get_template_directory() . '/inc/installation-fragments/theme-demos.php'; /** * Load Jetpack compatibility file. */ if ( defined( 'JETPACK__VERSION' ) ) { require get_template_directory() . '/inc/jetpack.php'; } if ( ! function_exists( 'wp_body_open' ) ) { /** * Shim for wp_body_open, ensuring backward compatibility with versions of WordPress older than 5.2. */ function wp_body_open() { // phpcs:ignore WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedFunctionFound do_action( 'wp_body_open' ); // phpcs:ignore WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedHooknameFound } }