'd6c08e', 'border' => 'c5ae7c', 'text' => '000000', 'link' => 'd8471d', 'url' => 'd8471d' ); } /** * Set the maximum content width of the normal content column. * This prevents large images from overrunning the sides of the column. */ if ( ! isset( $content_width ) ) $content_width = 652; /** * Load the Theme Options Page that lets users toggle the display of the Random Images photo gallery on attachments page */ require_once ( get_template_directory() . '/inc/theme-options.php' ); // Action hook to do all the major theme setup stuff add_action( 'after_setup_theme', 'matala_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; /** * Tell WordPress to run matala_setup() when the 'after_setup_theme' hook is run. */ if ( ! function_exists( 'matala_setup' ) ): function matala_setup() { // 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', 'video', 'quote', 'link', 'gallery', 'status' ) ); // Make theme available for translation // Translations can be filed in the /languages/ directory load_theme_textdomain( 'matala', get_template_directory() . '/languages' ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => __( 'Primary Menu', 'matala' ), ) ); // This theme allows users to set a custom background. add_theme_support( 'custom-background' ); // This theme uses post thumbnails. add_theme_support( 'post-thumbnails' ); add_image_size( 'normal', 300, 300 ); // Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link. function matala_page_menu_args($args) { $args['show_home'] = true; return $args; } add_filter( 'wp_page_menu_args', 'matala_page_menu_args' ); // This theme styles the visual editor. add_editor_style('editor-style.css'); } endif; function matala_custom_header_setup() { add_theme_support( 'custom-header', apply_filters( 'matala_custom_header_args', array( 'default-image' => '', 'default-text-color' => 'fff', 'width' => 940, 'height' => 150, 'wp-head-callback' => 'matala_header_style', 'admin-head-callback' => 'matala_admin_header_style', ) ) ); } add_action( 'after_setup_theme', 'matala_custom_header_setup' ); /** * Enqueue scripts and styles */ function matala_scripts() { wp_enqueue_style( 'matala', get_stylesheet_uri() ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); } add_action( 'wp_enqueue_scripts', 'matala_scripts' ); /** * Add custom header support */ if ( ! function_exists( 'matala_header_style' ) ) : /** * Styles the header image and text displayed on the blog * */ function matala_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 matala_admin_header_style() { ?> __( 'Default sidebar', 'matala' ), 'id' => 'primary-widget-area', 'description' => __( 'The primary widget area.', 'matala' ), 'before_widget' => '', 'before_title' => '