tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /* * Enable support for Post Thumbnails on posts and pages. * * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ */ add_theme_support( 'post-thumbnails' ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'menu-1' => esc_html__( 'Primary Menu', 'arke' ), ) ); /* * 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', ) ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); // Add image size for blog posts, 640px wide (and unlimited height). add_image_size( 'arke-blog', 640 ); } endif; add_action( 'after_setup_theme', 'arke_setup' ); /** * Registers an editor stylesheet for the theme. */ add_editor_style( 'editor-style.css' ); /** * 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 arke_content_width() { $GLOBALS['content_width'] = apply_filters( 'arke_content_width', 1040 ); } add_action( 'after_setup_theme', 'arke_content_width', 0 ); /** * Enqueue scripts and styles. */ function arke_scripts() { wp_enqueue_style( 'arke-style', get_stylesheet_uri() ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'arke_scripts' ); if ( ! function_exists( 'arke_thumbnail' ) ) : /** * Output the thumbnail if it exists. * * @param string $size Thunbnail size to output. */ function arke_thumbnail( $size = '' ) { if ( has_post_thumbnail() ) { ?>
'; } } add_action( 'wp_head', 'arke_pingback_header' ); if ( ! function_exists( 'arke_the_posts_navigation' ) ) : /** * Displays the navigation to next/previous set of posts, when applicable. */ function arke_the_posts_navigation() { $args = array( 'prev_text' => esc_html__( '← Older Posts', 'arke' ), 'next_text' => esc_html__( 'Newer Posts →', 'arke' ), 'screen_reader_text' => esc_html__( 'Posts Navigation', 'arke' ), ); the_posts_navigation( $args ); } endif; $tags_list = get_the_tag_list( '', esc_html__( ', ', 'arke' ) );