summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authordaniel g. siegel2014-02-04 18:10:58 +0100
committerdaniel g. siegel2014-02-04 18:10:58 +0100
commite0ceab385a8ee364b1a5fda29b185dc6b9d52d1c (patch)
tree795d23ecacfe6296793e3034547adbe337d344d5 /functions.php
downloadwp-remulus-e0ceab385a8ee364b1a5fda29b185dc6b9d52d1c.tar.gz
wp-remulus-e0ceab385a8ee364b1a5fda29b185dc6b9d52d1c.tar.bz2
wp-remulus-e0ceab385a8ee364b1a5fda29b185dc6b9d52d1c.zip
initial import
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php109
1 files changed, 109 insertions, 0 deletions
diff --git a/functions.php b/functions.php
new file mode 100644
index 0000000..b335508
--- /dev/null
+++ b/functions.php
@@ -0,0 +1,109 @@
+<?php
+/**
+ * remulus functions and definitions
+ *
+ * @package remulus
+ */
+
+/**
+ * Set the content width based on the theme's design and stylesheet.
+ */
+if ( ! isset( $content_width ) ) {
+ $content_width = 640; /* pixels */
+}
+
+if ( ! function_exists( 'remulus_setup' ) ) :
+/**
+ * Sets up theme defaults and registers support for various WordPress features.
+ *
+ * Note that this function is hooked into the after_setup_theme hook, which
+ * runs before the init hook. The init hook is too late for some features, such
+ * as indicating support for post thumbnails.
+ */
+function remulus_setup() {
+
+ // Add default posts and comments RSS feed links to head.
+ add_theme_support( 'automatic-feed-links' );
+
+ /*
+ * Enable support for Post Thumbnails on posts and pages.
+ *
+ * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
+ */
+ //add_theme_support( 'post-thumbnails' );
+
+ // This theme uses wp_nav_menu() in one location.
+ register_nav_menus( array(
+ 'primary' => __( 'Primary Menu', 'remulus' ),
+ ) );
+
+ // Enable support for Post Formats.
+ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) );
+
+ // Setup the WordPress core custom background feature.
+ add_theme_support( 'custom-background', apply_filters( 'remulus_custom_background_args', array(
+ 'default-color' => 'ffffff',
+ 'default-image' => '',
+ ) ) );
+
+ // Enable support for HTML5 markup.
+ add_theme_support( 'html5', array( 'comment-list', 'search-form', 'comment-form', ) );
+}
+endif; // remulus_setup
+add_action( 'after_setup_theme', 'remulus_setup' );
+
+/**
+ * Register widgetized area and update sidebar with default widgets.
+ */
+function remulus_widgets_init() {
+ register_sidebar( array(
+ 'name' => __( 'Sidebar', 'remulus' ),
+ 'id' => 'sidebar-1',
+ 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+ 'after_widget' => '</aside>',
+ 'before_title' => '<h1 class="widget-title">',
+ 'after_title' => '</h1>',
+ ) );
+}
+add_action( 'widgets_init', 'remulus_widgets_init' );
+
+/**
+ * Enqueue scripts and styles.
+ */
+function remulus_scripts() {
+ wp_enqueue_style( 'remulus-style', get_stylesheet_uri() );
+
+ wp_enqueue_script( 'remulus-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );
+
+ wp_enqueue_script( 'remulus-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );
+
+ if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
+ wp_enqueue_script( 'comment-reply' );
+ }
+}
+add_action( 'wp_enqueue_scripts', 'remulus_scripts' );
+
+/**
+ * Implement the Custom Header feature.
+ */
+//require get_template_directory() . '/inc/custom-header.php';
+
+/**
+ * Custom template tags for this theme.
+ */
+require get_template_directory() . '/inc/template-tags.php';
+
+/**
+ * Custom functions that act independently of the theme templates.
+ */
+require get_template_directory() . '/inc/extras.php';
+
+/**
+ * Customizer additions.
+ */
+require get_template_directory() . '/inc/customizer.php';
+
+/**
+ * Load Jetpack compatibility file.
+ */
+require get_template_directory() . '/inc/jetpack.php';