'Primary Navigation')); /* ======================================================================================================================== Actions and Filters ======================================================================================================================== */ add_action( 'wp_enqueue_scripts', 'bluesquared_script_enqueuer' ); add_filter( 'body_class', 'add_slug_to_body_class' ); /* ======================================================================================================================== Custom Post Types - include custom post types and taxonimies here e.g. e.g. require_once( 'custom-post-types/your-custom-post-type.php' ); ======================================================================================================================== */ /* ======================================================================================================================== Scripts ======================================================================================================================== */ /** * Add scripts via wp_head() * * @return void * @author Keir Whitaker */ function bluesquared_script_enqueuer() { wp_register_script( 'site', get_template_directory_uri().'/js/doubletaptogo.js', array( 'jquery' ) ); wp_enqueue_script( 'site' ); wp_register_script( 'global', get_template_directory_uri().'/js/site.js'); wp_enqueue_script( 'global' ); wp_register_style( 'screen', get_template_directory_uri().'/style.css', '', '', 'screen' ); wp_enqueue_style( 'screen' ); } /* ======================================================================================================================== Comments ======================================================================================================================== */ /** * Custom callback for outputting comments * * @return void * @author Keir Whitaker */ function bluesquared_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; ?> comment_approved == '1' ): ?>
  • 'Reply to Comment'), array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
    '', 'align' => 'alignnone', 'width' => '', 'caption' => '' ); /* Merge the defaults with user input. */ $attr = shortcode_atts( $defaults, $attr ); /* If the width is less than 1 or there is no caption, return the image wrapped inside a figure. */ if ( 1 > $attr['width'] || empty( $attr['caption'] ) ) { return "" . $content . ""; } /* Set up the attributes for the caption
    . */ $attributes = ( !empty( $attr['id'] ) ? ' id="' . esc_attr( $attr['id'] ) . '"' : '' ); $attributes .= ' class="wp-caption ' . esc_attr( $attr['align'] ) . '"'; $attributes .= ' style="width: ' . esc_attr( $attr['width'] ) . 'px"'; /* Open the caption
    . */ $output = ''; /* Allow shortcodes for the content the caption was created for. */ $output .= do_shortcode( $content ); /* Append the caption text. */ $output .= '
    ' . $attr['caption'] . '
    '; /* Close the caption
    . */ $output .= ''; /* Return the formatted, clean caption. */ return $output; } /* ======================================================================================================================== Sidebar ======================================================================================================================== */ function bluesquared_widgets_init() { register_sidebar( array( 'name' => __( 'Main Sidebar', 'bluesquared' ), 'id' => 'sidebar-1', 'description' => __( 'Appears on posts and pages except the optional Front Page template, which has its own widgets', 'bluesquared' ), 'before_widget' => '', 'before_title' => '

    ', 'after_title' => '

    ', ) ); } add_action( 'widgets_init', 'bluesquared_widgets_init' );