esc_html__( 'Primary Menu', 'animal-caretaker' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', ) ); /* * Enable support for custom logo. */ add_theme_support('custom-logo'); remove_theme_support( 'widgets-block-editor' ); // -- Disable Custom Colors add_theme_support( 'disable-custom-colors' ); // Gutenberg wide images. add_theme_support( 'align-wide' ); /* * This theme styles the visual editor to resemble the theme style, * specifically font, colors, icons, and column width. */ add_editor_style( array( 'css/editor-style.css' ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'animal_caretaker_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); } endif; add_action( 'after_setup_theme', 'animal_caretaker_setup' ); /* * Enable support for Post Formats. * * See: https://codex.wordpress.org/Post_Formats */ add_theme_support( 'post-formats', array('image','video','gallery','audio',) ); /** * Set the content width in pixels, based on the theme's design and stylesheet. * * Priority 0 to make it available to lower priority callbacks. * * @global int $content_width */ function animal_caretaker_content_width() { $GLOBALS['content_width'] = apply_filters( 'animal_caretaker_content_width', 1170 ); } add_action( 'after_setup_theme', 'animal_caretaker_content_width', 0 ); /** * Change number or products per row to 3 */ add_filter('loop_shop_columns', 'animal_caretaker_loop_columns', 999); if (!function_exists('animal_caretaker_loop_columns')) { function animal_caretaker_loop_columns() { return 3; // 3 products per row } } function animal_caretaker_customize_remove_register() { global $wp_customize; $wp_customize->remove_setting( 'display_header_text' ); $wp_customize->remove_control( 'display_header_text' ); } add_action( 'customize_register', 'animal_caretaker_customize_remove_register', 11 ); /** * All Styles & Scripts. */ require_once get_template_directory() . '/inc/enqueue.php'; /** * Implement the Custom Header feature. */ require_once get_template_directory() . '/inc/custom-header.php'; /** * Sidebar. */ require_once get_template_directory() . '/inc/sidebar/sidebar.php'; /** * Custom template tags for this theme. */ require_once get_template_directory() . '/inc/template-tags.php'; /** * Custom functions that act independently of the theme templates. */ require_once get_template_directory() . '/inc/extras.php'; /** * Customizer additions. */ require_once get_template_directory() . '/inc/customizer.php'; /** * Load Jetpack compatibility file. */ require_once get_template_directory() . '/inc/jetpack.php'; /** * Load Web Font */ require_once get_template_directory() . '/inc/wptt-webfont-loader.php'; /** * Load Recommended Plugin */ require_once get_template_directory() . '/inc/tgm-plugin/tgm.php'; /** * Called all the Customize file. */ require( get_template_directory() . '/inc/customize/premium.php'); /** * Get Started. */ require( get_template_directory() . '/inc/started/main.php'); /** * Admin notice function. */ require_once get_template_directory() . '/inc/admin-notice/admin.php'; /* * Logo Resizer */ function animal_caretaker_logo_resizer_setting() { $animal_caretaker_theme_logo_size_css = ''; $animal_caretaker_logo_resizer_setting = get_theme_mod('animal_caretaker_logo_resizer_setting'); $animal_caretaker_theme_logo_size_css = ' .custom-logo{ height: '.esc_attr($animal_caretaker_logo_resizer_setting).'px !important; width: '.esc_attr($animal_caretaker_logo_resizer_setting).'px !important; } '; wp_add_inline_style( 'animal-caretaker-style',$animal_caretaker_theme_logo_size_css ); } add_action( 'wp_enqueue_scripts', 'animal_caretaker_logo_resizer_setting' );