esc_html__( 'Primary Navigation', 'brubeck' ) ) ); /* * Add HTML 5 support. * */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' ) ); /* * Load custom template tags. * */ require get_template_directory() . '/inc/template-tags.php'; /* * Load custom the meta box. * */ require get_template_directory() . '/inc/metabox.php'; /* * Load widgets. * */ require get_template_directory() . '/inc/widgets/content-newsletter.php'; } add_action('after_setup_theme', 'brubeck_setup'); /** * Content width. * * @see https://codex.wordpress.org/Content_Width * * @since brubeck 1.0.0 * */ if ( ! isset( $content_width ) ) $content_width = 689; /** * Google fonts. * * @see https://gist.github.com/kailoon/e2dc2a04a8bd5034682c * * @since brubeck 1.0.0 * */ function brubeck_google_fonts_url() { $fonts_url = ''; $fonts = array(); $subsets = 'latin,latin-ext'; /* translators: If there are characters in your language that are not supported by Open Sans, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Open Sans font: on or off', 'brubeck' ) ) { $fonts[] = 'Open Sans:400,400i,700,700i'; } if ( $fonts ) { $fonts_url = add_query_arg( array( 'family' => urlencode( implode( '|', $fonts ) ), 'subset' => urlencode( $subsets ), ), 'https://fonts.googleapis.com/css' ); } return $fonts_url; } /** * Enqueue scripts & styles the front end. * * @see https://codex.wordpress.org/Function_Reference/wp_enqueue_script * * @since brubeck 1.0.0 * */ function brubeck_scripts() { if(!is_admin()) { // Load the jquery. wp_enqueue_script( 'jquery' ); // Load js plugins. wp_register_script('brubeck-plugins', get_template_directory_uri() . '/js/plugins.js', array('jquery'), '1.0.0', true ); wp_enqueue_script( 'brubeck-plugins' ); // Load the custom js. wp_register_script('brubeck-custom', get_template_directory_uri() . '/js/custom.js', array('jquery'), '1.0.0', true ); wp_enqueue_script( 'brubeck-custom' ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } // Load Google fonts, used in the main stylesheet. if ( get_option( 'brubeck_default_fonts_remove' ) == '' ) { wp_enqueue_style( 'brubeck-google-fonts', brubeck_google_fonts_url(), array(), null ); } // Load the main stylesheet. wp_enqueue_style( 'brubeck-style', get_stylesheet_uri() ); // Load the icon font. wp_register_style( 'brubeck-icons', get_template_directory_uri() . '/css/icons.css', array(), '1.0.0' ); wp_enqueue_style( 'brubeck-icons' ); } } add_action('wp_enqueue_scripts', 'brubeck_scripts'); /** * Custom typography, styles and scripts. * * @since brubeck 1.0.0 * */ function brubeck_custom_typography_function() { echo brubeck_custom_typography(); } add_action('wp_head', 'brubeck_custom_typography_function'); function brubeck_custom_style_function() { echo brubeck_custom_style(); } add_action('wp_head', 'brubeck_custom_style_function'); /** * This theme styles the visual editor to resemble the theme style. * * @see https://codex.wordpress.org/Editor_Style * * @since brubeck 1.0.0 * */ function brubeck_editor_styles() { add_editor_style( 'editor-style.css' ); } add_action( 'after_setup_theme', 'brubeck_editor_styles' ); /** * Registers a widget area. * * @link https://developer.wordpress.org/reference/functions/register_sidebar/ * * @since brubeck 1.0.0 * */ function brubeck_widgets_init() { register_sidebar( array( 'name' => 'Content Bottom', 'id' => 'sidebar-1', 'before_widget' => '', 'before_title' => '