'f7f3ed', 'border' => 'd1bfa6', 'text' => '121212', 'link' => 'cc4d22', 'url' => '07818c', ); /** * Set the content width based on the theme's design and stylesheet. * * Used to set the width of images and content. Should be equal to the width the theme * is designed for, generally via the style.css stylesheet. */ if ( ! isset( $content_width ) ) $content_width = 610; /** * Load the Theme Options Page that lets users control the social media icons at the top */ require_once ( get_template_directory() . '/inc/theme-options.php' ); /** * Tell WordPress to run liquorice_setup() when the 'after_setup_theme' hook is run. */ add_action( 'after_setup_theme', 'liquorice_setup' ); if ( ! function_exists( 'wp_body_open' ) ) : /** * Fire the wp_body_open action. * * Included for backward compatibility with WordPress versions prior to 5.2. */ function wp_body_open() { do_action( 'wp_body_open' ); } endif; if ( ! function_exists( 'liquorice_setup' ) ): function liquorice_setup() { // This theme uses post thumbnails. add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 150, 150 ); // Add default posts and comments RSS feed links to head add_theme_support( 'automatic-feed-links' ); /** * Let WordPress manage the document title. */ add_theme_support( 'title-tag' ); // This theme supports post formats. add_theme_support( 'post-formats', array( 'aside', 'image', 'quote', 'gallery' ) ); // Make theme available for translation // Translations can be filed in the /languages/ directory load_theme_textdomain( 'liquorice', get_template_directory() . '/languages' ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => __( 'Primary Menu', 'liquorice' ), ) ); // This theme allows users to set a custom background. add_theme_support( 'custom-background' ); // Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link. function liquorice_page_menu_args($args) { $args['show_home'] = true; return $args; } add_filter( 'wp_page_menu_args', 'liquorice_page_menu_args' ); add_theme_support( 'print-style' ); } endif; function liquorice_custom_header_setup() { add_theme_support( 'custom-header', apply_filters( 'liquorice_custom_header_args', array( 'default-image' => '', 'default-text-color' => 'cc4d22', 'width' => 900, 'height' => 235, 'wp-head-callback' => 'liquorice_header_style', 'admin-head-callback' => 'liquorice_admin_header_style', ) ) ); } add_action( 'after_setup_theme', 'liquorice_custom_header_setup' ); /** * Enqueue scripts and styles */ function liquorice_scripts() { wp_enqueue_style( 'liquorice', get_stylesheet_uri() ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); } add_action( 'wp_enqueue_scripts', 'liquorice_scripts' ); if ( ! function_exists( 'liquorice_header_style' ) ) : /** * Styles the header image and text displayed on the blog * */ function liquorice_header_style() { // If no custom options for text are set, let's bail if ( get_theme_support( 'custom-header', 'default-text-color' ) === get_header_textcolor() && '' == get_header_image() ) return; // If we get this far, we have custom styles. Let's do this. ?> Header admin panel. * */ function liquorice_admin_header_style() { ?> __( 'Sidebar', 'liquorice' ), 'id' => 'primary', 'before_widget' => '