Prechádzať zdrojové kódy

All Themes: Fix whitespace in functions.php

Ben Dwyer 4 rokov pred
rodič
commit
5a410e23c4
56 zmenil súbory, kde vykonal 4328 pridanie a 3668 odobranie
  1. 153 127
      affinity/functions.php
  2. 148 120
      altofocus/functions.php
  3. 97 67
      apostrophe-2/functions.php
  4. 0 1
      balasana/functions.php
  5. 0 1
      barnsbury/functions.php
  6. 1 0
      blank-canvas/functions.php
  7. 0 1
      brompton/functions.php
  8. 130 107
      button-2/functions.php
  9. 27 28
      calm-business/functions.php
  10. 135 118
      canard/functions.php
  11. 0 1
      coutoire/functions.php
  12. 0 1
      dalston/functions.php
  13. 184 162
      dara/functions.php
  14. 80 66
      dyad-2/functions.php
  15. 51 52
      elegant-business/functions.php
  16. 0 1
      exford/functions.php
  17. 51 52
      friendly-business/functions.php
  18. 130 110
      gazette/functions.php
  19. 0 1
      hever/functions.php
  20. 1 1
      ibis/functions.php
  21. 144 131
      illustratr/functions.php
  22. 200 169
      independent-publisher-2/functions.php
  23. 176 150
      intergalactic-2/functions.php
  24. 108 81
      ixion/functions.php
  25. 225 196
      karuna/functions.php
  26. 0 1
      leven/functions.php
  27. 168 137
      libre-2/functions.php
  28. 109 78
      libretto/functions.php
  29. 142 118
      lodestar/functions.php
  30. 0 1
      mayland/functions.php
  31. 0 1
      maywood/functions.php
  32. 9 10
      modern-business/functions.php
  33. 0 1
      morden/functions.php
  34. 155 129
      penscratch-2/functions.php
  35. 78 57
      photos/functions.php
  36. 141 113
      pique/functions.php
  37. 51 52
      professional-business/functions.php
  38. 113 92
      publication/functions.php
  39. 251 214
      radcliffe-2/functions.php
  40. 172 143
      rebalance/functions.php
  41. 0 1
      redhill/functions.php
  42. 0 1
      rivington/functions.php
  43. 1 2
      rockfield/functions.php
  44. 160 140
      scratchpad/functions.php
  45. 1 1
      seedlet-blocks/functions.php
  46. 1 0
      seedlet/functions.php
  47. 0 1
      shawburn/functions.php
  48. 209 174
      shoreditch/functions.php
  49. 143 117
      sketch/functions.php
  50. 54 55
      sophisticated-business/functions.php
  51. 1 2
      spearhead/functions.php
  52. 4 5
      stow/functions.php
  53. 0 1
      stratford/functions.php
  54. 150 126
      textbook/functions.php
  55. 173 151
      toujours/functions.php
  56. 1 0
      varia/functions.php

+ 153 - 127
affinity/functions.php

@@ -8,85 +8,100 @@
  */
  */
 
 
 if ( ! function_exists( 'affinity_setup' ) ) :
 if ( ! function_exists( 'affinity_setup' ) ) :
-/**
- * Sets up theme defaults and registers support for various WordPress features.
- *
- * Note that this function is hooked into the aftercomponentsetup_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 affinity_setup() {
-	/*
-	 * Make theme available for translation.
-	 * Translations can be filed in the /languages/ directory.
-	 * If you're building a theme based on components, use a find and replace
-	 * to change 'affinity' to the name of your theme in all the template files.
-	 */
-	load_theme_textdomain( 'affinity', get_template_directory() . '/languages' );
-
-	// Add default posts and comments RSS feed links to head.
-	add_theme_support( 'automatic-feed-links' );
-
-	/*
-	 * Let WordPress manage the document title.
-	 * By adding theme support, we declare that this theme does not use a
-	 * hard-coded <title> tag in the document head, and expect WordPress to
-	 * provide it for us.
-	 */
-	add_theme_support( 'title-tag' );
-
-	/*
-	 * Add editor styles
-	 */
-	add_editor_style();
-
-	/*
-	 * Add support for responsive embeds.
-	 */
-	add_theme_support( 'responsive-embeds' );
-
 	/**
 	/**
-	 * Add support for core custom logo
-	 * - also see fallback in inc/jetpack.php
-	 */
-	add_theme_support( 'custom-logo', array(
-		'height'      => 800,
-		'width'       => 250,
-		'flex-width'  => true,
-		'flex-height' => true,
-	) );
-
-	/*
-	 * Enable support for Post Thumbnails on posts and pages.
+	 * Sets up theme defaults and registers support for various WordPress features.
 	 *
 	 *
-	 * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
+	 * Note that this function is hooked into the aftercomponentsetup_theme hook, which
+	 * runs before the init hook. The init hook is too late for some features, such
+	 * as indicating support for post thumbnails.
 	 */
 	 */
-	add_theme_support( 'post-thumbnails' );
-	add_image_size( 'affinity-featured', 1500, 9999 );
 
 
-	// This theme uses wp_nav_menu() in one location.
-	register_nav_menus( array(
-		'top' => esc_html__( 'Top', 'affinity' ),
-	) );
+	function affinity_setup() {
+		/*
+		 * Make theme available for translation.
+		 * Translations can be filed in the /languages/ directory.
+		 * If you're building a theme based on components, use a find and replace
+		 * to change 'affinity' to the name of your theme in all the template files.
+		 */
+		load_theme_textdomain( 'affinity', get_template_directory() . '/languages' );
+
+		// Add default posts and comments RSS feed links to head.
+		add_theme_support( 'automatic-feed-links' );
+
+		/*
+		 * Let WordPress manage the document title.
+		 * By adding theme support, we declare that this theme does not use a
+		 * hard-coded <title> tag in the document head, and expect WordPress to
+		 * provide it for us.
+		 */
+		add_theme_support( 'title-tag' );
+
+		/*
+		 * Add editor styles
+		 */
+		add_editor_style();
+
+		/*
+		 * Add support for responsive embeds.
+		 */
+		add_theme_support( 'responsive-embeds' );
+
+		/**
+		 * Add support for core custom logo
+		 * - also see fallback in inc/jetpack.php
+		 */
+		add_theme_support(
+			'custom-logo',
+			array(
+				'height'      => 800,
+				'width'       => 250,
+				'flex-width'  => true,
+				'flex-height' => true,
+			)
+		);
 
 
-	/*
-	 * 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',
-	) );
-
-	// Set up the WordPress core custom background feature.
-	add_theme_support( 'custom-background', apply_filters( 'affinity_custom_background_args', array(
-		'default-color' => 'ffffff',
-		'default-image' => '',
-	) ) );
-}
+		/*
+		 * 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' );
+		add_image_size( 'affinity-featured', 1500, 9999 );
+
+		// This theme uses wp_nav_menu() in one location.
+		register_nav_menus(
+			array(
+				'top' => esc_html__( 'Top', 'affinity' ),
+			)
+		);
+
+		/*
+		 * 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',
+			)
+		);
+
+		// Set up the WordPress core custom background feature.
+		add_theme_support(
+			'custom-background',
+			apply_filters(
+				'affinity_custom_background_args',
+				array(
+					'default-color' => 'ffffff',
+					'default-image' => '',
+				)
+			)
+		);
+	}
 endif;
 endif;
 add_action( 'after_setup_theme', 'affinity_setup' );
 add_action( 'after_setup_theme', 'affinity_setup' );
 
 
@@ -130,19 +145,19 @@ add_action( 'after_setup_theme', 'affinity_content_width', 0 );
 
 
 if ( ! function_exists( 'affinity_content_width' ) ) :
 if ( ! function_exists( 'affinity_content_width' ) ) :
 
 
-function affinity_content_width() {
-	global $content_width;
+	function affinity_content_width() {
+		global $content_width;
 
 
-	if ( is_page_template( 'fullwidth-page.php' ) ) {
-	  $content_width = 1004;
-	}
+		if ( is_page_template( 'fullwidth-page.php' ) ) {
+			$content_width = 1004;
+		}
 
 
-	if ( is_page_template( 'front-page.php' ) || ! is_active_sidebar( 'sidebar-1' ) ) {
-		$content_width = 716;
-	}
+		if ( is_page_template( 'front-page.php' ) || ! is_active_sidebar( 'sidebar-1' ) ) {
+			$content_width = 716;
+		}
 
 
-}
-add_action( 'template_redirect', 'affinity_content_width' );
+	}
+	add_action( 'template_redirect', 'affinity_content_width' );
 
 
 endif; // if ! function_exists( 'affinity_content_width' )
 endif; // if ! function_exists( 'affinity_content_width' )
 
 
@@ -153,45 +168,53 @@ endif; // if ! function_exists( 'affinity_content_width' )
  * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
  * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
  */
  */
 function affinity_widgets_init() {
 function affinity_widgets_init() {
-	register_sidebar( array(
-		'name'          => esc_html__( 'Sidebar', 'affinity' ),
-		'id'            => 'sidebar-1',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer Widgets 1', 'affinity' ),
-		'id'            => 'footer-1',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer Widgets 2', 'affinity' ),
-		'id'            => 'footer-2',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer Widgets 3', 'affinity' ),
-		'id'            => 'footer-3',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Sidebar', 'affinity' ),
+			'id'            => 'sidebar-1',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer Widgets 1', 'affinity' ),
+			'id'            => 'footer-1',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer Widgets 2', 'affinity' ),
+			'id'            => 'footer-2',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer Widgets 3', 'affinity' ),
+			'id'            => 'footer-3',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
 }
 }
 add_action( 'widgets_init', 'affinity_widgets_init' );
 add_action( 'widgets_init', 'affinity_widgets_init' );
 
 
@@ -270,7 +293,7 @@ add_action( 'wp_enqueue_scripts', 'affinity_scripts' );
  * Gutenberg Editor Styles
  * Gutenberg Editor Styles
  */
  */
 function affinity_editor_styles() {
 function affinity_editor_styles() {
-	wp_enqueue_style( 'affinity-blocks-editor-style', get_template_directory_uri() . '/editor-blocks.css');
+	wp_enqueue_style( 'affinity-blocks-editor-style', get_template_directory_uri() . '/editor-blocks.css' );
 	wp_enqueue_style( 'affinity-fonts', affinity_fonts_url(), array(), null );
 	wp_enqueue_style( 'affinity-fonts', affinity_fonts_url(), array(), null );
 }
 }
 add_action( 'enqueue_block_editor_assets', 'affinity_editor_styles' );
 add_action( 'enqueue_block_editor_assets', 'affinity_editor_styles' );
@@ -304,9 +327,11 @@ function affinity_style_options() {
 
 
 		</style>
 		</style>
 
 
-	<?php }
+		<?php
+	}
 
 
-	if ( true == $backgroundscroll ) { ?>
+	if ( true == $backgroundscroll ) {
+		?>
 		<style type="text/css" id="affinity-scrolling-background-images">
 		<style type="text/css" id="affinity-scrolling-background-images">
 			@media screen and (min-width: 65em) {
 			@media screen and (min-width: 65em) {
 					.custom-header-image {
 					.custom-header-image {
@@ -323,7 +348,8 @@ function affinity_style_options() {
 					}
 					}
 			}
 			}
 		</style>
 		</style>
-	<?php }
+		<?php
+	}
 }
 }
 
 
 add_action( 'wp_head', 'affinity_style_options' );
 add_action( 'wp_head', 'affinity_style_options' );

+ 148 - 120
altofocus/functions.php

@@ -8,116 +8,134 @@
  */
  */
 
 
 if ( ! function_exists( 'altofocus_setup' ) ) :
 if ( ! function_exists( 'altofocus_setup' ) ) :
-/**
- * Sets up theme defaults and registers support for various WordPress features.
- *
- * Note that this function is hooked into the aftercomponentsetup_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 altofocus_setup() {
-
-	/*
-	 * Make theme available for translation.
-	 * Translations can be filed in the /languages/ directory.
-	 * If you're building a theme based on components, use a find and replace
-	 * to change 'altofocus' to the name of your theme in all the template files.
+	/**
+	 * Sets up theme defaults and registers support for various WordPress features.
+	 *
+	 * Note that this function is hooked into the aftercomponentsetup_theme hook, which
+	 * runs before the init hook. The init hook is too late for some features, such
+	 * as indicating support for post thumbnails.
 	 */
 	 */
-	load_theme_textdomain( 'altofocus', get_template_directory() . '/languages' );
 
 
-	// Add default posts and comments RSS feed links to head.
-	add_theme_support( 'automatic-feed-links' );
+	function altofocus_setup() {
 
 
-	/*
-	 * Let WordPress manage the document title.
-	 * By adding theme support, we declare that this theme does not use a
-	 * hard-coded <title> tag in the document head, and expect WordPress to
-	 * provide it for us.
-	 */
-	add_theme_support( 'title-tag' );
+		/*
+		 * Make theme available for translation.
+		 * Translations can be filed in the /languages/ directory.
+		 * If you're building a theme based on components, use a find and replace
+		 * to change 'altofocus' to the name of your theme in all the template files.
+		 */
+		load_theme_textdomain( 'altofocus', get_template_directory() . '/languages' );
 
 
-	/*
-	 * 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' );
+		// Add default posts and comments RSS feed links to head.
+		add_theme_support( 'automatic-feed-links' );
 
 
-	add_image_size( 'altofocus-thumb-image', 640, 9999, false );
-	add_image_size( 'altofocus-post-featured-image', 1200, 800, false );
+		/*
+		 * Let WordPress manage the document title.
+		 * By adding theme support, we declare that this theme does not use a
+		 * hard-coded <title> tag in the document head, and expect WordPress to
+		 * provide it for us.
+		 */
+		add_theme_support( 'title-tag' );
 
 
-	// This theme uses wp_nav_menu() in one location.
-	register_nav_menus( array(
-		'menu-1' => esc_html__( 'Top', 'altofocus' ),
-	) );
+		/*
+		 * 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' );
 
 
-	/**
-	 * Add support for core custom logo.
-	 */
-	add_theme_support( 'custom-logo', array(
-		'height'      => 200,
-		'width'       => 200,
-		'flex-width'  => true,
-		'flex-height' => true,
-	) );
+		add_image_size( 'altofocus-thumb-image', 640, 9999, false );
+		add_image_size( 'altofocus-post-featured-image', 1200, 800, false );
 
 
-	/*
-	 * 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',
-	) );
-
-	// Set up the WordPress core custom background feature.
-	add_theme_support( 'custom-background', apply_filters( 'altofocus_custom_background_args', array(
-		'default-color'      => 'ffffff',
-		'default-image'      => '',
-		'default-position-x' => 'center',
-		'default-position-y' => 'center',
-		'default-repeat'     => 'no-repeat',
-		'default-attachment' => 'fixed',
-		'default-size'       => 'cover',
-		'wp-head-callback'   => 'altofocus_custom_background_cb'
-	) ) );
-
-	// Add support for responsive embeds.
-	add_theme_support( 'responsive-embeds' );
-
-	// Add support for custom color scheme.
-	add_theme_support( 'editor-color-palette', array(
-		array(
-			'name'  => esc_html__( 'Orange', 'altofocus' ),
-			'slug'  => 'orange',
-			'color' => '#e38900',
-		),
-		array(
-			'name'  => esc_html__( 'Dark Gray', 'altofocus' ),
-			'slug'  => 'dark-gray',
-			'color' => '#111',
-		),
-		array(
-			'name'  => esc_html__( 'Medium Gray', 'altofocus' ),
-			'slug'  => 'medium-gray',
-			'color' => '#888',
-		),
-		array(
-			'name'  => esc_html__( 'Light Gray', 'altofocus' ),
-			'slug'  => 'light-gray',
-			'color' => '#ccc',
-		),
-		array(
-			'name'  => esc_html__( 'White', 'altofocus' ),
-			'slug'  => 'white',
-			'color' => '#fff',
-		),
-	) );
+		// This theme uses wp_nav_menu() in one location.
+		register_nav_menus(
+			array(
+				'menu-1' => esc_html__( 'Top', 'altofocus' ),
+			)
+		);
 
 
-}
+		/**
+		 * Add support for core custom logo.
+		 */
+		add_theme_support(
+			'custom-logo',
+			array(
+				'height'      => 200,
+				'width'       => 200,
+				'flex-width'  => true,
+				'flex-height' => true,
+			)
+		);
+
+		/*
+		 * 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',
+			)
+		);
+
+		// Set up the WordPress core custom background feature.
+		add_theme_support(
+			'custom-background',
+			apply_filters(
+				'altofocus_custom_background_args',
+				array(
+					'default-color'      => 'ffffff',
+					'default-image'      => '',
+					'default-position-x' => 'center',
+					'default-position-y' => 'center',
+					'default-repeat'     => 'no-repeat',
+					'default-attachment' => 'fixed',
+					'default-size'       => 'cover',
+					'wp-head-callback'   => 'altofocus_custom_background_cb',
+				)
+			)
+		);
+
+		// Add support for responsive embeds.
+		add_theme_support( 'responsive-embeds' );
+
+		// Add support for custom color scheme.
+		add_theme_support(
+			'editor-color-palette',
+			array(
+				array(
+					'name'  => esc_html__( 'Orange', 'altofocus' ),
+					'slug'  => 'orange',
+					'color' => '#e38900',
+				),
+				array(
+					'name'  => esc_html__( 'Dark Gray', 'altofocus' ),
+					'slug'  => 'dark-gray',
+					'color' => '#111',
+				),
+				array(
+					'name'  => esc_html__( 'Medium Gray', 'altofocus' ),
+					'slug'  => 'medium-gray',
+					'color' => '#888',
+				),
+				array(
+					'name'  => esc_html__( 'Light Gray', 'altofocus' ),
+					'slug'  => 'light-gray',
+					'color' => '#ccc',
+				),
+				array(
+					'name'  => esc_html__( 'White', 'altofocus' ),
+					'slug'  => 'white',
+					'color' => '#fff',
+				),
+			)
+		);
+
+	}
 endif;
 endif;
 add_action( 'after_setup_theme', 'altofocus_setup' );
 add_action( 'after_setup_theme', 'altofocus_setup' );
 
 
@@ -130,7 +148,7 @@ add_action( 'after_setup_theme', 'altofocus_setup' );
  */
  */
 function altofocus_content_width() {
 function altofocus_content_width() {
 
 
-	$GLOBALS[ 'content_width' ] = apply_filters( 'altofocus_content_width', '770' );
+	$GLOBALS['content_width'] = apply_filters( 'altofocus_content_width', '770' );
 }
 }
 add_action( 'after_setup_theme', 'altofocus_content_width', 0 );
 add_action( 'after_setup_theme', 'altofocus_content_width', 0 );
 
 
@@ -141,15 +159,17 @@ add_action( 'after_setup_theme', 'altofocus_content_width', 0 );
  */
  */
 function altofocus_widgets_init() {
 function altofocus_widgets_init() {
 
 
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer', 'altofocus' ),
-		'id'            => 'sidebar-1',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer', 'altofocus' ),
+			'id'            => 'sidebar-1',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
 }
 }
 add_action( 'widgets_init', 'altofocus_widgets_init' );
 add_action( 'widgets_init', 'altofocus_widgets_init' );
 
 
@@ -292,16 +312,24 @@ function altofocus_scripts() {
 	}
 	}
 
 
 	// Screenreader text
 	// Screenreader text
-	wp_localize_script( 'altofocus-navigation', 'altoFocusScreenReaderText', array(
-		'expand'   => esc_html__( 'expand child menu', 'altofocus' ),
-		'collapse' => esc_html__( 'collapse child menu', 'altofocus' ),
-	) );
+	wp_localize_script(
+		'altofocus-navigation',
+		'altoFocusScreenReaderText',
+		array(
+			'expand'   => esc_html__( 'expand child menu', 'altofocus' ),
+			'collapse' => esc_html__( 'collapse child menu', 'altofocus' ),
+		)
+	);
 
 
 	// Flexslider text
 	// Flexslider text
-	wp_localize_script( 'altofocus-flexslider', 'altoFocusFlexSliderText', array(
-		'next'     => esc_html__( 'Next', 'altofocus' ),
-		'previous' => esc_html__( 'Previous', 'altofocus' ),
-	) );
+	wp_localize_script(
+		'altofocus-flexslider',
+		'altoFocusFlexSliderText',
+		array(
+			'next'     => esc_html__( 'Next', 'altofocus' ),
+			'previous' => esc_html__( 'Previous', 'altofocus' ),
+		)
+	);
 }
 }
 add_action( 'wp_enqueue_scripts', 'altofocus_scripts' );
 add_action( 'wp_enqueue_scripts', 'altofocus_scripts' );
 
 
@@ -325,7 +353,7 @@ add_action( 'enqueue_block_editor_assets', 'altofocus_block_editor_styles' );
  * Check whether the browser supports JavaScript
  * Check whether the browser supports JavaScript
  */
  */
 function altofocus_html_js_class() {
 function altofocus_html_js_class() {
-	echo '<script>document.documentElement.className = document.documentElement.className.replace("no-js","js");</script>'. "\n";
+	echo '<script>document.documentElement.className = document.documentElement.className.replace("no-js","js");</script>' . "\n";
 }
 }
 add_action( 'wp_head', 'altofocus_html_js_class', 1 );
 add_action( 'wp_head', 'altofocus_html_js_class', 1 );
 
 

+ 97 - 67
apostrophe-2/functions.php

@@ -26,7 +26,6 @@ add_action( 'after_setup_theme', 'apostrophe_2_content_width', 0 );
  */
  */
 if ( ! function_exists( 'apostrophe_2_setup' ) ) :
 if ( ! function_exists( 'apostrophe_2_setup' ) ) :
 	function apostrophe_2_setup() {
 	function apostrophe_2_setup() {
-
 		/*
 		/*
 		 * Make theme available for translation.
 		 * Make theme available for translation.
 		 * Translations can be filed in the /languages/ directory.
 		 * Translations can be filed in the /languages/ directory.
@@ -44,42 +43,43 @@ if ( ! function_exists( 'apostrophe_2_setup' ) ) :
 
 
 		// Add custom colors to Gutenberg
 		// Add custom colors to Gutenberg
 		add_theme_support(
 		add_theme_support(
-			'editor-color-palette', array(
+			'editor-color-palette',
+			array(
 				array(
 				array(
 					'name'  => esc_html__( 'Black', 'apostrophe-2' ),
 					'name'  => esc_html__( 'Black', 'apostrophe-2' ),
-					'slug' => 'black',
+					'slug'  => 'black',
 					'color' => '#404040',
 					'color' => '#404040',
 				),
 				),
 				array(
 				array(
 					'name'  => esc_html__( 'Dark Gray', 'apostrophe-2' ),
 					'name'  => esc_html__( 'Dark Gray', 'apostrophe-2' ),
-					'slug' => 'dark-gray',
+					'slug'  => 'dark-gray',
 					'color' => '#686868',
 					'color' => '#686868',
 				),
 				),
 				array(
 				array(
 					'name'  => esc_html__( 'Medium Gray', 'apostrophe-2' ),
 					'name'  => esc_html__( 'Medium Gray', 'apostrophe-2' ),
-					'slug' => 'medium-gray',
+					'slug'  => 'medium-gray',
 					'color' => '#999999',
 					'color' => '#999999',
 				),
 				),
 				array(
 				array(
 					'name'  => esc_html__( 'Light Gray', 'apostrophe-2' ),
 					'name'  => esc_html__( 'Light Gray', 'apostrophe-2' ),
-					'slug' => 'light-gray',
+					'slug'  => 'light-gray',
 					'color' => '#d9d9d9',
 					'color' => '#d9d9d9',
 				),
 				),
 				array(
 				array(
 					'name'  => esc_html__( 'White', 'apostrophe-2' ),
 					'name'  => esc_html__( 'White', 'apostrophe-2' ),
-					'slug' => 'white',
+					'slug'  => 'white',
 					'color' => '#ffffff',
 					'color' => '#ffffff',
 				),
 				),
 				array(
 				array(
 					'name'  => esc_html__( 'Blue', 'apostrophe-2' ),
 					'name'  => esc_html__( 'Blue', 'apostrophe-2' ),
-					'slug' => 'blue',
+					'slug'  => 'blue',
 					'color' => '#159ae7',
 					'color' => '#159ae7',
 				),
 				),
 				array(
 				array(
 					'name'  => esc_html__( 'Dark Blue', 'apostrophe-2' ),
 					'name'  => esc_html__( 'Dark Blue', 'apostrophe-2' ),
-					'slug' => 'dark-blue',
+					'slug'  => 'dark-blue',
 					'color' => '#362e77',
 					'color' => '#362e77',
-				)
+				),
 			)
 			)
 		);
 		);
 
 
@@ -102,34 +102,52 @@ if ( ! function_exists( 'apostrophe_2_setup' ) ) :
 		add_image_size( 'apostrophe-2-mini', 60, 60, true );
 		add_image_size( 'apostrophe-2-mini', 60, 60, true );
 		add_image_size( 'apostrophe-2-gallery', 550, 550, true );
 		add_image_size( 'apostrophe-2-gallery', 550, 550, true );
 
 
-		register_nav_menus( array(
-			'menu-1' => esc_html__( 'Header Menu', 'apostrophe-2' ),
-		) );
+		register_nav_menus(
+			array(
+				'menu-1' => esc_html__( 'Header Menu', 'apostrophe-2' ),
+			)
+		);
 
 
 		/*
 		/*
 		 * Switch default core markup for search form, comment form, and comments
 		 * Switch default core markup for search form, comment form, and comments
 		 * to output valid HTML5.
 		 * to output valid HTML5.
 		 */
 		 */
-		add_theme_support( 'html5', array(
-			'comment-list', 'comment-form', 'search-form', 'gallery', 'caption',
-		) );
+		add_theme_support(
+			'html5',
+			array(
+				'comment-list',
+				'comment-form',
+				'search-form',
+				'gallery',
+				'caption',
+			)
+		);
 
 
 		// Set up the WordPress core custom background feature.
 		// Set up the WordPress core custom background feature.
-		add_theme_support( 'custom-background', apply_filters( 'apostrophe_2_custom_background_args', array(
-			'default-color' => 'ffffff',
-			'default-image' => '',
-		) ) );
+		add_theme_support(
+			'custom-background',
+			apply_filters(
+				'apostrophe_2_custom_background_args',
+				array(
+					'default-color' => 'ffffff',
+					'default-image' => '',
+				)
+			)
+		);
 
 
 		// Enable support for custom logo.
 		// Enable support for custom logo.
-		add_theme_support( 'custom-logo', array(
-			'height'      => 300,
-			'width'       => 1030,
-			'flex-height' => true,
-			'flex-width'  => true
-		) );
+		add_theme_support(
+			'custom-logo',
+			array(
+				'height'      => 300,
+				'width'       => 1030,
+				'flex-height' => true,
+				'flex-width'  => true,
+			)
+		);
 
 
 		// Add theme support for selective refresh for widgets.
 		// Add theme support for selective refresh for widgets.
-    	add_theme_support( 'customize-selective-refresh-widgets' );
+		add_theme_support( 'customize-selective-refresh-widgets' );
 	}
 	}
 endif; // apostrophe_2_setup
 endif; // apostrophe_2_setup
 add_action( 'after_setup_theme', 'apostrophe_2_setup' );
 add_action( 'after_setup_theme', 'apostrophe_2_setup' );
@@ -153,41 +171,49 @@ add_action( 'template_redirect', 'apostrophe_2_adjusted_content_width', 0 );
  * @link http://codex.wordpress.org/Function_Reference/register_sidebar
  * @link http://codex.wordpress.org/Function_Reference/register_sidebar
  */
  */
 function apostrophe_2_widgets_init() {
 function apostrophe_2_widgets_init() {
-	register_sidebar( array(
-		'name'          => esc_html__( 'Primary', 'apostrophe-2' ),
-		'id'            => 'sidebar-1',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Secondary', 'apostrophe-2' ),
-		'id'            => 'sidebar-2',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Tertiary', 'apostrophe-2' ),
-		'id'            => 'sidebar-3',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer Sidebar', 'apostrophe-2' ),
-		'id'            => 'sidebar-4',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h3 class="widget-title">',
-		'after_title'   => '</h3>',
-	) );
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Primary', 'apostrophe-2' ),
+			'id'            => 'sidebar-1',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Secondary', 'apostrophe-2' ),
+			'id'            => 'sidebar-2',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Tertiary', 'apostrophe-2' ),
+			'id'            => 'sidebar-3',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer Sidebar', 'apostrophe-2' ),
+			'id'            => 'sidebar-4',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h3 class="widget-title">',
+			'after_title'   => '</h3>',
+		)
+	);
 }
 }
 add_action( 'widgets_init', 'apostrophe_2_widgets_init' );
 add_action( 'widgets_init', 'apostrophe_2_widgets_init' );
 
 
@@ -251,10 +277,14 @@ function apostrophe_2_scripts() {
 		wp_enqueue_script( 'comment-reply' );
 		wp_enqueue_script( 'comment-reply' );
 	}
 	}
 
 
-	wp_localize_script( 'apostrophe-2-navigation', 'screenReaderText', array(
-		'expand'   => esc_html__( 'expand child menu', 'apostrophe-2' ),
-		'collapse' => esc_html__( 'collapse child menu', 'apostrophe-2' ),
-	) );
+	wp_localize_script(
+		'apostrophe-2-navigation',
+		'screenReaderText',
+		array(
+			'expand'   => esc_html__( 'expand child menu', 'apostrophe-2' ),
+			'collapse' => esc_html__( 'collapse child menu', 'apostrophe-2' ),
+		)
+	);
 }
 }
 add_action( 'wp_enqueue_scripts', 'apostrophe_2_scripts' );
 add_action( 'wp_enqueue_scripts', 'apostrophe_2_scripts' );
 
 
@@ -262,7 +292,7 @@ add_action( 'wp_enqueue_scripts', 'apostrophe_2_scripts' );
  * Gutenberg Editor Styles
  * Gutenberg Editor Styles
  */
  */
 function apostrophe_2_editor_styles() {
 function apostrophe_2_editor_styles() {
-	wp_enqueue_style( 'apostrophe-2-editor-block-style', get_template_directory_uri() . '/css/editor-blocks.css');
+	wp_enqueue_style( 'apostrophe-2-editor-block-style', get_template_directory_uri() . '/css/editor-blocks.css' );
 	wp_enqueue_style( 'apostrophe-2-fonts', apostrophe_2_fonts_url(), array(), null );
 	wp_enqueue_style( 'apostrophe-2-fonts', apostrophe_2_fonts_url(), array(), null );
 }
 }
 add_action( 'enqueue_block_editor_assets', 'apostrophe_2_editor_styles' );
 add_action( 'enqueue_block_editor_assets', 'apostrophe_2_editor_styles' );

+ 0 - 1
balasana/functions.php

@@ -18,7 +18,6 @@ if ( ! function_exists( 'balasana_setup' ) ) :
 	 * as indicating support for post thumbnails.
 	 * as indicating support for post thumbnails.
 	 */
 	 */
 	function balasana_setup() {
 	function balasana_setup() {
-
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		add_editor_style( 'style-editor.css' );
 		add_editor_style( 'style-editor.css' );
 
 

+ 0 - 1
barnsbury/functions.php

@@ -18,7 +18,6 @@ if ( ! function_exists( 'barnsbury_setup' ) ) :
 	 * as indicating support for post thumbnails.
 	 * as indicating support for post thumbnails.
 	 */
 	 */
 	function barnsbury_setup() {
 	function barnsbury_setup() {
-
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		add_editor_style( 'style-editor.css' );
 		add_editor_style( 'style-editor.css' );
 
 

+ 1 - 0
blank-canvas/functions.php

@@ -18,6 +18,7 @@ if ( ! function_exists( 'blank_canvas_setup' ) ) :
 	 * as indicating support for post thumbnails.
 	 * as indicating support for post thumbnails.
 	 */
 	 */
 	function blank_canvas_setup() {
 	function blank_canvas_setup() {
+
 		// Add support for editor styles.
 		// Add support for editor styles.
 		add_theme_support( 'editor-styles' );
 		add_theme_support( 'editor-styles' );
 
 

+ 0 - 1
brompton/functions.php

@@ -18,7 +18,6 @@ if ( ! function_exists( 'brompton_setup' ) ) :
 	 * as indicating support for post thumbnails.
 	 * as indicating support for post thumbnails.
 	 */
 	 */
 	function brompton_setup() {
 	function brompton_setup() {
-
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		add_editor_style( 'style-editor.css' );
 		add_editor_style( 'style-editor.css' );
 
 

+ 130 - 107
button-2/functions.php

@@ -6,89 +6,104 @@
  */
  */
 
 
 if ( ! function_exists( 'button_2_setup' ) ) :
 if ( ! function_exists( 'button_2_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 button_2_setup() {
-	/*
-	 * Make theme available for translation.
-	 * Translations can be filed in the /languages/ directory.
-	 * If you're building a theme based on button, use a find and replace
-	 * to change 'button-2' to the name of your theme in all the template files
+	/**
+	 * 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.
 	 */
 	 */
-	load_theme_textdomain( 'button-2', get_template_directory() . '/languages' );
-
-	// Add default posts and comments RSS feed links to head.
-	add_theme_support( 'automatic-feed-links' );
 
 
-	/*
-	 * Let WordPress manage the document title.
-	 * By adding theme support, we declare that this theme does not use a
-	 * hard-coded <title> tag in the document head, and expect WordPress to
-	 * provide it for us.
-	 */
-	add_theme_support( 'title-tag' );
+	function button_2_setup() {
+		/*
+		 * Make theme available for translation.
+		 * Translations can be filed in the /languages/ directory.
+		 * If you're building a theme based on button, use a find and replace
+		 * to change 'button-2' to the name of your theme in all the template files
+		 */
+		load_theme_textdomain( 'button-2', get_template_directory() . '/languages' );
 
 
-	/*
-	 * 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' );
-	add_image_size( 'button-2-featured', '982', '9999' );
+		// Add default posts and comments RSS feed links to head.
+		add_theme_support( 'automatic-feed-links' );
 
 
-	// This theme uses wp_nav_menu() in two locations.
-	register_nav_menus( array(
-		'menu-1' => esc_html__( 'Header', 'button-2' ),
-	) );
+		/*
+		 * Let WordPress manage the document title.
+		 * By adding theme support, we declare that this theme does not use a
+		 * hard-coded <title> tag in the document head, and expect WordPress to
+		 * provide it for us.
+		 */
+		add_theme_support( 'title-tag' );
 
 
-	/*
-	 * 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',
-	) );
-
-	// Enable support for custom logo.
-	add_theme_support( 'custom-logo', array(
-		'height'      => 300,
-		'width'       => 1200,
-		'flex-height' => true,
-		'flex-width'  => true
-	) );
-
-	// Add theme support for selective refresh for widgets.
-	add_theme_support( 'customize-selective-refresh-widgets' );
-
-	// Set up the WordPress core custom background feature.
-	add_theme_support( 'custom-background', apply_filters( 'button_2_custom_background_args', array(
-		'default-color' => 'f8f8f8',
+		/*
+		 * 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' );
+		add_image_size( 'button-2-featured', '982', '9999' );
+
+		// This theme uses wp_nav_menu() in two locations.
+		register_nav_menus(
+			array(
+				'menu-1' => esc_html__( 'Header', 'button-2' ),
+			)
+		);
 
 
 		/*
 		/*
-		 * We're using a unique filename for the background image
-		 * to avoid users uploading a file with the same filename
-		 * and avoiding conflict with the `user-background` body_class
-		 * in inc/extras.php and assets/js/customizer.js
+		 * 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',
+			)
+		);
 
 
-		'default-image' => esc_url( get_template_directory_uri() ) . '/img/buttonbg20170303.png',
-	) ) );
+		// Enable support for custom logo.
+		add_theme_support(
+			'custom-logo',
+			array(
+				'height'      => 300,
+				'width'       => 1200,
+				'flex-height' => true,
+				'flex-width'  => true,
+			)
+		);
 
 
-	// Add support for wide images in Gutenberg
-	add_theme_support( 'align-wide' );
+		// Add theme support for selective refresh for widgets.
+		add_theme_support( 'customize-selective-refresh-widgets' );
+
+		// Set up the WordPress core custom background feature.
+		add_theme_support(
+			'custom-background',
+			apply_filters(
+				'button_2_custom_background_args',
+				array(
+					'default-color' => 'f8f8f8',
+
+					/*
+					* We're using a unique filename for the background image
+					* to avoid users uploading a file with the same filename
+					* and avoiding conflict with the `user-background` body_class
+					* in inc/extras.php and assets/js/customizer.js
+					*/
+
+					'default-image' => esc_url( get_template_directory_uri() ) . '/img/buttonbg20170303.png',
+				)
+			)
+		);
 
 
-	// Add support for responsive embeds.
-	add_theme_support( 'responsive-embeds' );
-}
+		// Add support for wide images in Gutenberg
+		add_theme_support( 'align-wide' );
+
+		// Add support for responsive embeds.
+		add_theme_support( 'responsive-embeds' );
+	}
 endif; // button_2_setup
 endif; // button_2_setup
 add_action( 'after_setup_theme', 'button_2_setup' );
 add_action( 'after_setup_theme', 'button_2_setup' );
 
 
@@ -122,39 +137,47 @@ add_action( 'template_redirect', 'button_2_adjusted_content_width', 0 );
  * @link http://codex.wordpress.org/Function_Reference/register_sidebar
  * @link http://codex.wordpress.org/Function_Reference/register_sidebar
  */
  */
 function button_2_widgets_init() {
 function button_2_widgets_init() {
-	register_sidebar( array(
-		'name'          => esc_html__( 'Sidebar', 'button-2' ),
-		'id'            => 'sidebar-1',
-		'description'   => '',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h1 class="widget-title">',
-		'after_title'   => '</h1>',
-	) );
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 1', 'button-2' ),
-		'id'            => 'sidebar-2',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h1 class="widget-title">',
-		'after_title'   => '</h1>',
-	) );
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 2', 'button-2' ),
-		'id'            => 'sidebar-3',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h1 class="widget-title">',
-		'after_title'   => '</h1>',
-	) );
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 3', 'button-2' ),
-		'id'            => 'sidebar-4',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h1 class="widget-title">',
-		'after_title'   => '</h1>',
-	) );
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Sidebar', 'button-2' ),
+			'id'            => 'sidebar-1',
+			'description'   => '',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h1 class="widget-title">',
+			'after_title'   => '</h1>',
+		)
+	);
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 1', 'button-2' ),
+			'id'            => 'sidebar-2',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h1 class="widget-title">',
+			'after_title'   => '</h1>',
+		)
+	);
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 2', 'button-2' ),
+			'id'            => 'sidebar-3',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h1 class="widget-title">',
+			'after_title'   => '</h1>',
+		)
+	);
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 3', 'button-2' ),
+			'id'            => 'sidebar-4',
+			'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', 'button_2_widgets_init' );
 add_action( 'widgets_init', 'button_2_widgets_init' );
 
 
@@ -184,9 +207,9 @@ add_action( 'wp_enqueue_scripts', 'button_2_scripts' );
  * Register Google Fonts
  * Register Google Fonts
  */
  */
 function button_2_fonts_url() {
 function button_2_fonts_url() {
-    $fonts_url = '';
+	$fonts_url = '';
 
 
-    /* Translators: If there are characters in your language that are not
+	/* Translators: If there are characters in your language that are not
 	 * supported by Lato, translate this to 'off'. Do not translate
 	 * supported by Lato, translate this to 'off'. Do not translate
 	 * into your own language.
 	 * into your own language.
 	 */
 	 */

+ 27 - 28
calm-business/functions.php

@@ -8,32 +8,31 @@
  */
  */
 
 
 if ( ! function_exists( 'calm_business_setup' ) ) {
 if ( ! function_exists( 'calm_business_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 calm_business_setup() {
-
-        /**
-         * Add support for core custom logo.
-         *
-         * @link https://codex.wordpress.org/Theme_Logo
-         */
-        add_theme_support(
-            'custom-logo',
-            array(
-                'height'      => 176,
-                'width'       => 176,
-                'flex-width'  => true,
-                'flex-height' => false,
-                'header-text' => array( 'site-title' ),
-            )
-        );
-
-        // Editor color palette.
+	/**
+	 * 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 calm_business_setup() {
+		/**
+		 * Add support for core custom logo.
+		 *
+		 * @link https://codex.wordpress.org/Theme_Logo
+		 */
+		add_theme_support(
+			'custom-logo',
+			array(
+				'height'      => 176,
+				'width'       => 176,
+				'flex-width'  => true,
+				'flex-height' => false,
+				'header-text' => array( 'site-title' ),
+			)
+		);
+
+		// Editor color palette.
 		add_theme_support(
 		add_theme_support(
 			'editor-color-palette',
 			'editor-color-palette',
 			array(
 			array(
@@ -64,7 +63,7 @@ if ( ! function_exists( 'calm_business_setup' ) ) {
 				),
 				),
 			)
 			)
 		);
 		);
-    }
+	}
 } // calm_business_setup
 } // calm_business_setup
 add_action( 'after_setup_theme', 'calm_business_setup', 30 );
 add_action( 'after_setup_theme', 'calm_business_setup', 30 );
 
 
@@ -123,4 +122,4 @@ require get_stylesheet_directory() . '/inc/jetpack.php';
 /**
 /**
  * Customizer additions.
  * Customizer additions.
  */
  */
-require get_stylesheet_directory() . '/inc/customizer.php';
+require get_stylesheet_directory() . '/inc/customizer.php';

+ 135 - 118
canard/functions.php

@@ -13,7 +13,6 @@ if ( ! isset( $content_width ) ) {
 }
 }
 
 
 if ( ! function_exists( 'canard_content_width' ) ) {
 if ( ! function_exists( 'canard_content_width' ) ) {
-
 	function canard_content_width() {
 	function canard_content_width() {
 		global $content_width;
 		global $content_width;
 
 
@@ -21,112 +20,126 @@ if ( ! function_exists( 'canard_content_width' ) ) {
 			$content_width = 869;
 			$content_width = 869;
 		}
 		}
 	}
 	}
-
 }
 }
 add_action( 'template_redirect', 'canard_content_width' );
 add_action( 'template_redirect', 'canard_content_width' );
 
 
 if ( ! function_exists( 'canard_setup' ) ) :
 if ( ! function_exists( 'canard_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 canard_setup() {
-
-	/*
-	 * Make theme available for translation.
-	 * Translations can be filed in the /languages/ directory.
-	 * If you're building a theme based on Canard, use a find and replace
-	 * to change 'canard' to the name of your theme in all the template files
-	 */
-	load_theme_textdomain( 'canard', get_template_directory() . '/languages' );
-
-	// Add default posts and comments RSS feed links to head.
-	add_theme_support( 'automatic-feed-links' );
-
-	/*
-	 * Let WordPress manage the document title.
-	 * By adding theme support, we declare that this theme does not use a
-	 * hard-coded <title> 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.
+	/**
+	 * Sets up theme defaults and registers support for various WordPress features.
 	 *
 	 *
-	 * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
+	 * 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.
 	 */
 	 */
-	add_theme_support( 'post-thumbnails' );
-	add_image_size( 'canard-post-thumbnail', 870, 773, true );
-	add_image_size( 'canard-featured-content-thumbnail', 915, 500, true );
-	add_image_size( 'canard-single-thumbnail', 1920, 768, true );
-
-	// Add support for responsive embeds.
-	add_theme_support( 'responsive-embeds' );
-
-	// Add custom colors to Gutenberg
-	add_theme_support(
-		'editor-color-palette', array(
-			array(
-				'name'  => esc_html__( 'Black', 'canard' ),
-				'slug' => 'black',
-				'color' => '#222222',
-			),
-			array(
-				'name'  => esc_html__( 'Dark Gray', 'canard' ),
-				'slug' => 'dark-gray',
-				'color' => '#555555',
-			),
+	function canard_setup() {
+
+		/*
+		 * Make theme available for translation.
+		 * Translations can be filed in the /languages/ directory.
+		 * If you're building a theme based on Canard, use a find and replace
+		 * to change 'canard' to the name of your theme in all the template files
+		 */
+		load_theme_textdomain( 'canard', get_template_directory() . '/languages' );
+
+		// Add default posts and comments RSS feed links to head.
+		add_theme_support( 'automatic-feed-links' );
+
+		/*
+		 * Let WordPress manage the document title.
+		 * By adding theme support, we declare that this theme does not use a
+		 * hard-coded <title> 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 http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
+		 */
+		add_theme_support( 'post-thumbnails' );
+		add_image_size( 'canard-post-thumbnail', 870, 773, true );
+		add_image_size( 'canard-featured-content-thumbnail', 915, 500, true );
+		add_image_size( 'canard-single-thumbnail', 1920, 768, true );
+
+		// Add support for responsive embeds.
+		add_theme_support( 'responsive-embeds' );
+
+		// Add custom colors to Gutenberg
+		add_theme_support(
+			'editor-color-palette',
 			array(
 			array(
-				'name'  => esc_html__( 'Medium Gray', 'canard' ),
-				'slug' => 'medium-gray',
-				'color' => '#777777',
-			),
-			array(
-				'name'  => esc_html__( 'Light Gray', 'canard' ),
-				'slug' => 'light-gray',
-				'color' => '#dddddd',
-			),
-			array(
-				'name'  => esc_html__( 'White', 'canard' ),
-				'slug' => 'white',
-				'color' => '#ffffff',
-			),
+				array(
+					'name'  => esc_html__( 'Black', 'canard' ),
+					'slug'  => 'black',
+					'color' => '#222222',
+				),
+				array(
+					'name'  => esc_html__( 'Dark Gray', 'canard' ),
+					'slug'  => 'dark-gray',
+					'color' => '#555555',
+				),
+				array(
+					'name'  => esc_html__( 'Medium Gray', 'canard' ),
+					'slug'  => 'medium-gray',
+					'color' => '#777777',
+				),
+				array(
+					'name'  => esc_html__( 'Light Gray', 'canard' ),
+					'slug'  => 'light-gray',
+					'color' => '#dddddd',
+				),
+				array(
+					'name'  => esc_html__( 'White', 'canard' ),
+					'slug'  => 'white',
+					'color' => '#ffffff',
+				),
+				array(
+					'name'  => esc_html__( 'Red', 'canard' ),
+					'slug'  => 'red',
+					'color' => '#d11415',
+				),
+			)
+		);
+
+		// This theme uses wp_nav_menu() in four locations.
+		register_nav_menus(
 			array(
 			array(
-				'name'  => esc_html__( 'Red', 'canard' ),
-				'slug' => 'red',
-				'color' => '#d11415',
+				'primary'   => __( 'Primary Location', 'canard' ),
+				'secondary' => __( 'Secondary Location', 'canard' ),
+				'footer'    => __( 'Footer Location', 'canard' ),
+				'social'    => __( 'Social Location', 'canard' ),
 			)
 			)
-		)
-	);
+		);
 
 
-	// This theme uses wp_nav_menu() in four locations.
-	register_nav_menus( array(
-		'primary'   => __( 'Primary Location', 'canard' ),
-		'secondary' => __( 'Secondary Location', 'canard' ),
-		'footer'    => __( 'Footer Location', 'canard' ),
-		'social'    => __( 'Social Location', 'canard' ),
-	) );
-
-	/*
-	 * 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',
-	) );
+		/*
+		 * 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',
+			)
+		);
 
 
-	/*
-	 * Enable support for Post Formats.
-	 * See http://codex.wordpress.org/Post_Formats
-	 */
-	add_theme_support( 'post-formats', array(
-		'image', 'link', 'gallery',
-	) );
-}
+		/*
+		 * Enable support for Post Formats.
+		 * See http://codex.wordpress.org/Post_Formats
+		 */
+		add_theme_support(
+			'post-formats',
+			array(
+				'image',
+				'link',
+				'gallery',
+			)
+		);
+	}
 endif; // canard_setup
 endif; // canard_setup
 add_action( 'after_setup_theme', 'canard_setup' );
 add_action( 'after_setup_theme', 'canard_setup' );
 
 
@@ -136,25 +149,29 @@ add_action( 'after_setup_theme', 'canard_setup' );
  * @link http://codex.wordpress.org/Function_Reference/register_sidebar
  * @link http://codex.wordpress.org/Function_Reference/register_sidebar
  */
  */
 function canard_widgets_init() {
 function canard_widgets_init() {
-	register_sidebar( array(
-		'name'          => __( 'Sidebar', 'canard' ),
-		'id'            => 'sidebar-1',
-		'description'   => '',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => __( 'Footer', 'canard' ),
-		'id'            => 'sidebar-2',
-		'description'   => '',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
+	register_sidebar(
+		array(
+			'name'          => __( 'Sidebar', 'canard' ),
+			'id'            => 'sidebar-1',
+			'description'   => '',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => __( 'Footer', 'canard' ),
+			'id'            => 'sidebar-2',
+			'description'   => '',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
 }
 }
 add_action( 'widgets_init', 'canard_widgets_init' );
 add_action( 'widgets_init', 'canard_widgets_init' );
 
 
@@ -191,7 +208,7 @@ function canard_lato_inconsolata_fonts_url() {
 			'family' => urlencode( implode( '|', $font_families ) ),
 			'family' => urlencode( implode( '|', $font_families ) ),
 			'subset' => urlencode( 'latin,latin-ext' ),
 			'subset' => urlencode( 'latin,latin-ext' ),
 		);
 		);
-		$fonts_url = add_query_arg( $query_args, "https://fonts.googleapis.com/css" );
+		$fonts_url  = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
 	}
 	}
 
 
 	return $fonts_url;
 	return $fonts_url;
@@ -230,7 +247,7 @@ function canard_pt_serif_playfair_display_font_url() {
 			'family' => urlencode( implode( '|', $font_families ) ),
 			'family' => urlencode( implode( '|', $font_families ) ),
 			'subset' => urlencode( 'cyrillic,latin,latin-ext' ),
 			'subset' => urlencode( 'cyrillic,latin,latin-ext' ),
 		);
 		);
-		$fonts_url = add_query_arg( $query_args, "https://fonts.googleapis.com/css" );
+		$fonts_url  = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
 	}
 	}
 
 
 	return $fonts_url;
 	return $fonts_url;
@@ -288,7 +305,7 @@ add_action( 'wp_enqueue_scripts', 'canard_scripts' );
  * Gutenberg Editor Styles
  * Gutenberg Editor Styles
  */
  */
 function canard_editor_styles() {
 function canard_editor_styles() {
-	wp_enqueue_style( 'canard-editor-block-style', get_template_directory_uri() . '/editor-blocks.css');
+	wp_enqueue_style( 'canard-editor-block-style', get_template_directory_uri() . '/editor-blocks.css' );
 	wp_enqueue_style( 'canard-pt-serif-playfair-display', canard_pt_serif_playfair_display_font_url() );
 	wp_enqueue_style( 'canard-pt-serif-playfair-display', canard_pt_serif_playfair_display_font_url() );
 	wp_enqueue_style( 'canard-lato-inconsolata', canard_lato_inconsolata_fonts_url() );
 	wp_enqueue_style( 'canard-lato-inconsolata', canard_lato_inconsolata_fonts_url() );
 	wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.3' );
 	wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.3' );

+ 0 - 1
coutoire/functions.php

@@ -18,7 +18,6 @@ if ( ! function_exists( 'coutoire_setup' ) ) :
 	 * as indicating support for post thumbnails.
 	 * as indicating support for post thumbnails.
 	 */
 	 */
 	function coutoire_setup() {
 	function coutoire_setup() {
-
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		add_editor_style( 'style-editor.css' );
 		add_editor_style( 'style-editor.css' );
 
 

+ 0 - 1
dalston/functions.php

@@ -18,7 +18,6 @@ if ( ! function_exists( 'dalston_setup' ) ) :
 	 * as indicating support for post thumbnails.
 	 * as indicating support for post thumbnails.
 	 */
 	 */
 	function dalston_setup() {
 	function dalston_setup() {
-
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		add_editor_style( 'style-editor.css' );
 		add_editor_style( 'style-editor.css' );
 
 

+ 184 - 162
dara/functions.php

@@ -8,134 +8,148 @@
  */
  */
 
 
 if ( ! function_exists( 'dara_setup' ) ) :
 if ( ! function_exists( 'dara_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 dara_setup() {
-	/*
-	 * Make theme available for translation.
-	 * Translations can be filed in the /languages/ directory.
-	 * If you're building a theme based on components, use a find and replace
-	 * to change 'dara' to the name of your theme in all the template files.
-	 */
-	load_theme_textdomain( 'dara', get_template_directory() . '/languages' );
-
-	// Add default posts and comments RSS feed links to head.
-	add_theme_support( 'automatic-feed-links' );
-
-	/*
-	 * Let WordPress manage the document title.
-	 * By adding theme support, we declare that this theme does not use a
-	 * hard-coded <title> 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.
+	/**
+	 * Sets up theme defaults and registers support for various WordPress features.
 	 *
 	 *
-	 * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
+	 * 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.
 	 */
 	 */
-
-	 add_theme_support( 'post-thumbnails' );
-
-	// Post thumbnails
-	add_image_size( 'dara-featured-image', 880, 312, true );
-	// Hero Image on the front page slider
-	add_image_size( 'dara-hero-thumbnail', 1180, 600, true );
-	// Full width and grid page template
-	add_image_size( 'dara-page-thumbnail', 1180, 435, true );
-	// Grid child page thumbnail
-	add_image_size( 'dara-grid-thumbnail', 360, 242, true );
-	// Testimonial thumbnail
-	add_image_size( 'dara-testimonial-thumbnail', 180, 180, true );
-
-	// Add support for responsive embeds.
-	add_theme_support( 'responsive-embeds' );
-
-	// Add custom colors to Gutenberg
-	add_theme_support(
-		'editor-color-palette', array(
-			array(
-				'name'  => esc_html__( 'Black', 'dara' ),
-				'slug' => 'black',
-				'color' => '#404040',
-			),
-			array(
-				'name'  => esc_html__( 'Dark Gray', 'dara' ),
-				'slug' => 'dark-gray',
-				'color' => '#444340',
-			),
-			array(
-				'name'  => esc_html__( 'Medium Gray', 'dara' ),
-				'slug' => 'medium-gray',
-				'color' => '#a8a6a1',
-			),
-			array(
-				'name'  => esc_html__( 'Light Gray', 'dara' ),
-				'slug' => 'light-gray',
-				'color' => '#e6e6e6',
-			),
+	function dara_setup() {
+
+		/*
+		 * Make theme available for translation.
+		 * Translations can be filed in the /languages/ directory.
+		 * If you're building a theme based on components, use a find and replace
+		 * to change 'dara' to the name of your theme in all the template files.
+		 */
+		load_theme_textdomain( 'dara', get_template_directory() . '/languages' );
+
+		// Add default posts and comments RSS feed links to head.
+		add_theme_support( 'automatic-feed-links' );
+
+		/*
+		 * Let WordPress manage the document title.
+		 * By adding theme support, we declare that this theme does not use a
+		 * hard-coded <title> 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' );
+
+		// Post thumbnails
+		add_image_size( 'dara-featured-image', 880, 312, true );
+		// Hero Image on the front page slider
+		add_image_size( 'dara-hero-thumbnail', 1180, 600, true );
+		// Full width and grid page template
+		add_image_size( 'dara-page-thumbnail', 1180, 435, true );
+		// Grid child page thumbnail
+		add_image_size( 'dara-grid-thumbnail', 360, 242, true );
+		// Testimonial thumbnail
+		add_image_size( 'dara-testimonial-thumbnail', 180, 180, true );
+
+		// Add support for responsive embeds.
+		add_theme_support( 'responsive-embeds' );
+
+		// Add custom colors to Gutenberg
+		add_theme_support(
+			'editor-color-palette',
 			array(
 			array(
-				'name'  => esc_html__( 'White', 'dara' ),
-				'slug' => 'white',
-				'color' => '#ffffff',
-			),
+				array(
+					'name'  => esc_html__( 'Black', 'dara' ),
+					'slug'  => 'black',
+					'color' => '#404040',
+				),
+				array(
+					'name'  => esc_html__( 'Dark Gray', 'dara' ),
+					'slug'  => 'dark-gray',
+					'color' => '#444340',
+				),
+				array(
+					'name'  => esc_html__( 'Medium Gray', 'dara' ),
+					'slug'  => 'medium-gray',
+					'color' => '#a8a6a1',
+				),
+				array(
+					'name'  => esc_html__( 'Light Gray', 'dara' ),
+					'slug'  => 'light-gray',
+					'color' => '#e6e6e6',
+				),
+				array(
+					'name'  => esc_html__( 'White', 'dara' ),
+					'slug'  => 'white',
+					'color' => '#ffffff',
+				),
+				array(
+					'name'  => esc_html__( 'Blue', 'dara' ),
+					'slug'  => 'blue',
+					'color' => '#15b6b8',
+				),
+				array(
+					'name'  => esc_html__( 'Dark Blue', 'dara' ),
+					'slug'  => 'dark-blue',
+					'color' => '#0c8384',
+				),
+			)
+		);
+
+		// This theme uses wp_nav_menu() in one location.
+		register_nav_menus(
 			array(
 			array(
-				'name'  => esc_html__( 'Blue', 'dara' ),
-				'slug' => 'blue',
-				'color' => '#15b6b8',
-			),
+				'menu-1' => esc_html__( 'Header', 'dara' ),
+			)
+		);
+
+		/*
+		 * Switch default core markup for search form, comment form, and comments
+		 * to output valid HTML5.
+		 */
+		add_theme_support(
+			'html5',
 			array(
 			array(
-				'name'  => esc_html__( 'Dark Blue', 'dara' ),
-				'slug' => 'dark-blue',
-				'color' => '#0c8384',
+				'search-form',
+				'comment-form',
+				'comment-list',
+				'gallery',
+				'caption',
 			)
 			)
-		)
-	);
+		);
 
 
-	// This theme uses wp_nav_menu() in one location.
-	register_nav_menus( array(
-		'menu-1' => esc_html__( 'Header', 'dara' ),
-	) );
+		// Add theme support for selective refresh for widgets.
+		add_theme_support( 'customize-selective-refresh-widgets' );
+
+		// Set up the WordPress core custom background feature.
+		add_theme_support(
+			'custom-background',
+			apply_filters(
+				'dara_custom_background_args',
+				array(
+					'default-color' => '444340',
+				)
+			)
+		);
 
 
-	/*
-	 * 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' );
-
-	// Set up the WordPress core custom background feature.
-	add_theme_support( 'custom-background', apply_filters( 'dara_custom_background_args', array(
-		'default-color' => '444340',
-	) ) );
-
-	// Add theme support for custom logos
-	add_theme_support( 'custom-logo',
-		array(
-			'width'       => 1200,
-			'height'      => 300,
-			'flex-width'  => true,
-			'flex-height' => true,
-		)
-	);
+		// Add theme support for custom logos
+		add_theme_support(
+			'custom-logo',
+			array(
+				'width'       => 1200,
+				'height'      => 300,
+				'flex-width'  => true,
+				'flex-height' => true,
+			)
+		);
 
 
-	// Add theme support for excerpts on pages
-	add_post_type_support( 'page', 'excerpt' );
-}
+		// Add theme support for excerpts on pages
+		add_post_type_support( 'page', 'excerpt' );
+	}
 endif;
 endif;
 add_action( 'after_setup_theme', 'dara_setup' );
 add_action( 'after_setup_theme', 'dara_setup' );
 
 
@@ -190,12 +204,12 @@ function dara_fonts_url() {
 	/* translators: If there are characters in your language that are not supported
 	/* translators: If there are characters in your language that are not supported
 	 * by Source Sans Pro, translate this to 'off'. Do not translate into your own language.
 	 * by Source Sans Pro, translate this to 'off'. Do not translate into your own language.
 	 */
 	 */
-	$source_sans_pro = esc_html_x( 'on', 'Source Sans Pro font: on or off',	 'dara' );
+	$source_sans_pro = esc_html_x( 'on', 'Source Sans Pro font: on or off', 'dara' );
 
 
 	/* translators: If there are characters in your language that are not supported
 	/* translators: If there are characters in your language that are not supported
 	 * by Yrsa, translate this to 'off'. Do not translate into your own language.
 	 * by Yrsa, translate this to 'off'. Do not translate into your own language.
 	 */
 	 */
-	$yrsa = esc_html_x( 'on', 'Yrsa font: on or off',  'dara' );
+	$yrsa = esc_html_x( 'on', 'Yrsa font: on or off', 'dara' );
 
 
 	if ( 'off' !== $source_sans_pro || 'off' !== $merriweather || 'off' !== $Yrsa ) {
 	if ( 'off' !== $source_sans_pro || 'off' !== $merriweather || 'off' !== $Yrsa ) {
 		$font_families = array();
 		$font_families = array();
@@ -210,7 +224,7 @@ function dara_fonts_url() {
 			'family' => urlencode( implode( '|', $font_families ) ),
 			'family' => urlencode( implode( '|', $font_families ) ),
 			'subset' => urlencode( 'latin,latin-ext' ),
 			'subset' => urlencode( 'latin,latin-ext' ),
 		);
 		);
-		$fonts_url = add_query_arg( $query_args, "https://fonts.googleapis.com/css" );
+		$fonts_url  = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
 	}
 	}
 
 
 	return $fonts_url;
 	return $fonts_url;
@@ -222,38 +236,46 @@ function dara_fonts_url() {
  * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
  * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
  */
  */
 function dara_widgets_init() {
 function dara_widgets_init() {
-	register_sidebar( array(
-		'name'          => esc_html__( 'Sidebar', 'dara' ),
-		'id'            => 'sidebar-1',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h3 class="widget-title">',
-		'after_title'   => '</h3>',
-	) );
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 1', 'dara' ),
-		'id'            => 'sidebar-2',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h3 class="widget-title">',
-		'after_title'   => '</h3>',
-	) );
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 2', 'dara' ),
-		'id'            => 'sidebar-3',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h3 class="widget-title">',
-		'after_title'   => '</h3>',
-	) );
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 3', 'dara' ),
-		'id'            => 'sidebar-4',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h3 class="widget-title">',
-		'after_title'   => '</h3>',
-	) );
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Sidebar', 'dara' ),
+			'id'            => 'sidebar-1',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h3 class="widget-title">',
+			'after_title'   => '</h3>',
+		)
+	);
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 1', 'dara' ),
+			'id'            => 'sidebar-2',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h3 class="widget-title">',
+			'after_title'   => '</h3>',
+		)
+	);
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 2', 'dara' ),
+			'id'            => 'sidebar-3',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h3 class="widget-title">',
+			'after_title'   => '</h3>',
+		)
+	);
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 3', 'dara' ),
+			'id'            => 'sidebar-4',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h3 class="widget-title">',
+			'after_title'   => '</h3>',
+		)
+	);
 }
 }
 add_action( 'widgets_init', 'dara_widgets_init' );
 add_action( 'widgets_init', 'dara_widgets_init' );
 
 
@@ -279,7 +301,7 @@ function dara_scripts() {
 	}
 	}
 
 
 	// If there's an active Video widget, and it's (hopefully) in the footer widget area
 	// If there's an active Video widget, and it's (hopefully) in the footer widget area
-	if ( is_active_widget( '','', 'media_video' ) && ( is_active_sidebar( 'sidebar-2' ) || is_active_sidebar( 'sidebar-3' ) || is_active_sidebar( 'sidebar-4' ) ) ) {
+	if ( is_active_widget( '', '', 'media_video' ) && ( is_active_sidebar( 'sidebar-2' ) || is_active_sidebar( 'sidebar-3' ) || is_active_sidebar( 'sidebar-4' ) ) ) {
 		wp_enqueue_script( 'dara-video', get_template_directory_uri() . '/assets/js/video-widget.js', array( 'jquery' ), '20170608', true );
 		wp_enqueue_script( 'dara-video', get_template_directory_uri() . '/assets/js/video-widget.js', array( 'jquery' ), '20170608', true );
 	}
 	}
 
 
@@ -295,19 +317,19 @@ add_action( 'wp_enqueue_scripts', 'dara_scripts' );
  * Gutenberg Editor Styles
  * Gutenberg Editor Styles
  */
  */
 function dara_editor_styles() {
 function dara_editor_styles() {
-	wp_enqueue_style( 'dara-editor-block-style', get_template_directory_uri() . '/editor-blocks.css');
+	wp_enqueue_style( 'dara-editor-block-style', get_template_directory_uri() . '/editor-blocks.css' );
 	wp_enqueue_style( 'dara-fonts', dara_fonts_url() );
 	wp_enqueue_style( 'dara-fonts', dara_fonts_url() );
 	wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.3' );
 	wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.3' );
 }
 }
 add_action( 'enqueue_block_editor_assets', 'dara_editor_styles' );
 add_action( 'enqueue_block_editor_assets', 'dara_editor_styles' );
 
 
 if ( ! function_exists( 'dara_continue_reading_link' ) ) :
 if ( ! function_exists( 'dara_continue_reading_link' ) ) :
-/**
- * Returns an ellipsis and "Continue reading" plus off-screen title link for excerpts
- */
-function dara_continue_reading_link() {
-	return '&hellip; <a href="'. esc_url( get_permalink() ) . '" class="more-link">' . sprintf( __( 'Continue reading <span class="screen-reader-text">%1$s</span>', 'dara' ), esc_attr( strip_tags( get_the_title() ) ) ) . '</a>';
-}
+	/**
+	 * Returns an ellipsis and "Continue reading" plus off-screen title link for excerpts
+	 */
+	function dara_continue_reading_link() {
+		return '&hellip; <a href="' . esc_url( get_permalink() ) . '" class="more-link">' . sprintf( __( 'Continue reading <span class="screen-reader-text">%1$s</span>', 'dara' ), esc_attr( strip_tags( get_the_title() ) ) ) . '</a>';
+	}
 endif; // dara_continue_reading_link
 endif; // dara_continue_reading_link
 
 
 /**
 /**

+ 80 - 66
dyad-2/functions.php

@@ -14,6 +14,7 @@ if ( ! function_exists( 'dyad_2_setup' ) ) :
 	 * as indicating support for post thumbnails.
 	 * as indicating support for post thumbnails.
 	 */
 	 */
 	function dyad_2_setup() {
 	function dyad_2_setup() {
+
 		/*
 		/*
 		 * Make theme available for translation.
 		 * Make theme available for translation.
 		 * Translations can be filed in the /languages/ directory.
 		 * Translations can be filed in the /languages/ directory.
@@ -36,22 +37,27 @@ if ( ! function_exists( 'dyad_2_setup' ) ) :
 		/**
 		/**
 		 * Add custom logo support
 		 * Add custom logo support
 		 */
 		 */
-		add_theme_support( 'custom-logo', array(
-			'height'      => 300,
-			'width'       => 600,
-			'flex-width'  => true,
-   			'header-text' => array(
-				'site-title',
-				'site-description',
-			),
-		) );
+		add_theme_support(
+			'custom-logo',
+			array(
+				'height'      => 300,
+				'width'       => 600,
+				'flex-width'  => true,
+				'header-text' => array(
+					'site-title',
+					'site-description',
+				),
+			)
+		);
 
 
 		/*
 		/*
 		 * Register menus
 		 * Register menus
 		 */
 		 */
-		register_nav_menus( array(
-			'menu-1' => esc_html__( 'Primary Menu', 'dyad-2' ),
-		) );
+		register_nav_menus(
+			array(
+				'menu-1' => esc_html__( 'Primary Menu', 'dyad-2' ),
+			)
+		);
 
 
 		/*
 		/*
 		 * Add Post Format support
 		 * Add Post Format support
@@ -76,12 +82,15 @@ if ( ! function_exists( 'dyad_2_setup' ) ) :
 		 * Switch default core markup for search form, comment form, and comments
 		 * Switch default core markup for search form, comment form, and comments
 		 * to output valid HTML5.
 		 * to output valid HTML5.
 		 */
 		 */
-		add_theme_support( 'html5', array(
-			'search-form',
-			'comment-form',
-			'gallery',
-			'caption',
-		) );
+		add_theme_support(
+			'html5',
+			array(
+				'search-form',
+				'comment-form',
+				'gallery',
+				'caption',
+			)
+		);
 
 
 		// Load default block styles.
 		// Load default block styles.
 		add_theme_support( 'wp-block-styles' );
 		add_theme_support( 'wp-block-styles' );
@@ -100,43 +109,46 @@ if ( ! function_exists( 'dyad_2_setup' ) ) :
 		add_editor_style( dyad_2_fonts_url() );
 		add_editor_style( dyad_2_fonts_url() );
 
 
 		// Add support for custom color scheme.
 		// Add support for custom color scheme.
-		add_theme_support( 'editor-color-palette', array(
+		add_theme_support(
+			'editor-color-palette',
 			array(
 			array(
-				'name'  => esc_html__( 'Bright Blue', 'dyad-2' ),
-				'slug'  => 'bright-blue',
-				'color' => '#678db8',
-			),
-			array(
-				'name'  => esc_html__( 'Yellow', 'dyad-2' ),
-				'slug'  => 'yellow',
-				'color' => '#e7ae01',
-			),
-			array(
-				'name'  => esc_html__( 'Light Gray-Blue', 'dyad-2' ),
-				'slug'  => 'light-gray-blue',
-				'color' => '#abb7c3',
-			),
-			array(
-				'name'  => esc_html__( 'Medium Gray', 'dyad-2' ),
-				'slug'  => 'medium-gray',
-				'color' => '#6a6c6e',
-			),
-			array(
-				'name'  => esc_html__( 'Dark Gray', 'dyad-2' ),
-				'slug'  => 'dark-gray',
-				'color' => '#1a1c1e',
-			),
-			array(
-				'name'  => esc_html__( 'Dark Gray-Blue', 'dyad-2' ),
-				'slug'  => 'dark-gray-blue',
-				'color' => '#292c2f',
-			),
-			array(
-				'name'  => esc_html__( 'White', 'dyad-2' ),
-				'slug'  => 'white',
-				'color' => '#fff',
-			),
-		) );
+				array(
+					'name'  => esc_html__( 'Bright Blue', 'dyad-2' ),
+					'slug'  => 'bright-blue',
+					'color' => '#678db8',
+				),
+				array(
+					'name'  => esc_html__( 'Yellow', 'dyad-2' ),
+					'slug'  => 'yellow',
+					'color' => '#e7ae01',
+				),
+				array(
+					'name'  => esc_html__( 'Light Gray-Blue', 'dyad-2' ),
+					'slug'  => 'light-gray-blue',
+					'color' => '#abb7c3',
+				),
+				array(
+					'name'  => esc_html__( 'Medium Gray', 'dyad-2' ),
+					'slug'  => 'medium-gray',
+					'color' => '#6a6c6e',
+				),
+				array(
+					'name'  => esc_html__( 'Dark Gray', 'dyad-2' ),
+					'slug'  => 'dark-gray',
+					'color' => '#1a1c1e',
+				),
+				array(
+					'name'  => esc_html__( 'Dark Gray-Blue', 'dyad-2' ),
+					'slug'  => 'dark-gray-blue',
+					'color' => '#292c2f',
+				),
+				array(
+					'name'  => esc_html__( 'White', 'dyad-2' ),
+					'slug'  => 'white',
+					'color' => '#fff',
+				),
+			)
+		);
 
 
 	}
 	}
 endif; // dyad_2_setup
 endif; // dyad_2_setup
@@ -174,15 +186,17 @@ add_filter( 'excerpt_more', 'dyad_2_excerpt_continue_reading' );
  * @link http://codex.wordpress.org/Function_Reference/register_sidebar
  * @link http://codex.wordpress.org/Function_Reference/register_sidebar
  */
  */
 function dyad_2_widgets_init() {
 function dyad_2_widgets_init() {
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer', 'dyad-2' ),
-		'id'            => 'sidebar-1',
-		'description'   => esc_html__( 'Displays in footer area.', 'dyad-2' ),
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h3 class="widget-title">',
-		'after_title'   => '</h3>',
-	) );
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer', 'dyad-2' ),
+			'id'            => 'sidebar-1',
+			'description'   => esc_html__( 'Displays in footer area.', 'dyad-2' ),
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h3 class="widget-title">',
+			'after_title'   => '</h3>',
+		)
+	);
 }
 }
 add_action( 'widgets_init', 'dyad_2_widgets_init' );
 add_action( 'widgets_init', 'dyad_2_widgets_init' );
 
 
@@ -194,12 +208,12 @@ add_action( 'widgets_init', 'dyad_2_widgets_init' );
  * @return  integer number of widgets in the sidebar
  * @return  integer number of widgets in the sidebar
  */
  */
 function dyad_2_count_widgets( $id ) {
 function dyad_2_count_widgets( $id ) {
-	$count = 0;
+	$count            = 0;
 	$sidebars_widgets = wp_get_sidebars_widgets();
 	$sidebars_widgets = wp_get_sidebars_widgets();
 
 
 	if ( array_key_exists( $id, $sidebars_widgets ) ) {
 	if ( array_key_exists( $id, $sidebars_widgets ) ) {
 
 
-		foreach ( ( array ) $sidebars_widgets[$id] as $value ) {
+		foreach ( (array) $sidebars_widgets[ $id ] as $value ) {
 			// Don't count the Cookies or Mailchimp widgets, since they're not visible in the widget area.
 			// Don't count the Cookies or Mailchimp widgets, since they're not visible in the widget area.
 			if ( strpos( $value, 'eu_cookie_law_widget' ) === false && strpos( $value, 'widget_mailchimp_subscriber_popup' ) === false ) {
 			if ( strpos( $value, 'eu_cookie_law_widget' ) === false && strpos( $value, 'widget_mailchimp_subscriber_popup' ) === false ) {
 				$count++;
 				$count++;
@@ -235,7 +249,7 @@ function dyad_2_widget_column_class( $widget_id ) {
  * Wrap avatars in div for easier styling
  * Wrap avatars in div for easier styling
  */
  */
 function dyad_2_get_avatar( $avatar ) {
 function dyad_2_get_avatar( $avatar ) {
-	if( ! is_admin() ) {
+	if ( ! is_admin() ) {
 		$avatar = '<span class="avatar-container">' . $avatar . '</span>';
 		$avatar = '<span class="avatar-container">' . $avatar . '</span>';
 	}
 	}
 	return $avatar;
 	return $avatar;

+ 51 - 52
elegant-business/functions.php

@@ -8,63 +8,62 @@
  */
  */
 
 
 if ( ! function_exists( 'elegant_business_setup' ) ) :
 if ( ! function_exists( 'elegant_business_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 elegant_business_setup() {
-
 	/**
 	/**
-	 * Add support for core custom logo.
+	 * Sets up theme defaults and registers support for various WordPress features.
 	 *
 	 *
-	 * @link https://codex.wordpress.org/Theme_Logo
+	 * 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.
 	 */
 	 */
-	add_theme_support(
-		'custom-logo',
-		array(
-			'height'      => 128,
-			'width'       => 190,
-			'flex-width'  => true,
-			'flex-height' => false,
-			'header-text' => array( 'site-title' ),
-		)
-	);
-
-	// Editor color palette.
-	add_theme_support(
-		'editor-color-palette',
-		array(
-			array(
-				'name'  => __( 'Primary', 'elegant-business' ),
-				'slug'  => 'primary',
-				'color' => '#c43d80', // $color__link
-			),
-			array(
-				'name'  => __( 'Secondary', 'elegant-business' ),
-				'slug'  => 'secondary',
-				'color' => '#9e3067', // $color__border-link-hover
-			),
+	function elegant_business_setup() {
+		/**
+		 * Add support for core custom logo.
+		 *
+		 * @link https://codex.wordpress.org/Theme_Logo
+		 */
+		add_theme_support(
+			'custom-logo',
 			array(
 			array(
-				'name'  => __( 'Dark Gray', 'elegant-business' ),
-				'slug'  => 'dark-gray',
-				'color' => '#111111', // $color__text-main
-			),
-			array(
-				'name'  => __( 'Light Gray', 'elegant-business' ),
-				'slug'  => 'light-gray',
-				'color' => '#767676', // $color__text-light
-			),
+				'height'      => 128,
+				'width'       => 190,
+				'flex-width'  => true,
+				'flex-height' => false,
+				'header-text' => array( 'site-title' ),
+			)
+		);
+
+		// Editor color palette.
+		add_theme_support(
+			'editor-color-palette',
 			array(
 			array(
-				'name'  => __( 'White', 'elegant-business' ),
-				'slug'  => 'white',
-				'color' => '#ffffff',
-			),
-		)
-	);
-}
+				array(
+					'name'  => __( 'Primary', 'elegant-business' ),
+					'slug'  => 'primary',
+					'color' => '#c43d80', // $color__link
+				),
+				array(
+					'name'  => __( 'Secondary', 'elegant-business' ),
+					'slug'  => 'secondary',
+					'color' => '#9e3067', // $color__border-link-hover
+				),
+				array(
+					'name'  => __( 'Dark Gray', 'elegant-business' ),
+					'slug'  => 'dark-gray',
+					'color' => '#111111', // $color__text-main
+				),
+				array(
+					'name'  => __( 'Light Gray', 'elegant-business' ),
+					'slug'  => 'light-gray',
+					'color' => '#767676', // $color__text-light
+				),
+				array(
+					'name'  => __( 'White', 'elegant-business' ),
+					'slug'  => 'white',
+					'color' => '#ffffff',
+				),
+			)
+		);
+	}
 endif; // elegant_business_setup
 endif; // elegant_business_setup
 add_action( 'after_setup_theme', 'elegant_business_setup', 30 );
 add_action( 'after_setup_theme', 'elegant_business_setup', 30 );
 
 

+ 0 - 1
exford/functions.php

@@ -18,7 +18,6 @@ if ( ! function_exists( 'exford_setup' ) ) :
 	 * as indicating support for post thumbnails.
 	 * as indicating support for post thumbnails.
 	 */
 	 */
 	function exford_setup() {
 	function exford_setup() {
-
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		add_editor_style( 'style-editor.css' );
 		add_editor_style( 'style-editor.css' );
 
 

+ 51 - 52
friendly-business/functions.php

@@ -8,64 +8,63 @@
  */
  */
 
 
 if ( ! function_exists( 'friendly_business_setup' ) ) :
 if ( ! function_exists( 'friendly_business_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 friendly_business_setup() {
-
 	/**
 	/**
-	 * Add support for core custom logo.
+	 * Sets up theme defaults and registers support for various WordPress features.
 	 *
 	 *
-	 * @link https://codex.wordpress.org/Theme_Logo
+	 * 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.
 	 */
 	 */
-	add_theme_support(
-		'custom-logo',
-		array(
-			'height'      => 180,
-			'width'       => 180,
-			'flex-width'  => true,
-			'flex-height' => false,
-			'header-text' => array( 'site-title' ),
-		)
-	);
-
-	// Editor color palette.
-	add_theme_support(
-		'editor-color-palette',
-		array(
-			array(
-				'name'  => __( 'Primary', 'friendly-business' ),
-				'slug'  => 'primary',
-				'color' => '#20603c', // $color__link
-			),
-			array(
-				'name'  => __( 'Secondary', 'friendly-business' ),
-				'slug'  => 'secondary',
-				'color' => '#133a24', // $color__border-link-hover
-			),
+	function friendly_business_setup() {
+		/**
+		 * Add support for core custom logo.
+		 *
+		 * @link https://codex.wordpress.org/Theme_Logo
+		 */
+		add_theme_support(
+			'custom-logo',
 			array(
 			array(
-				'name'  => __( 'Dark Gray', 'friendly-business' ),
-				'slug'  => 'dark-gray',
-				'color' => '#3c2323', // $color__text-main
-			),
-			array(
-				'name'  => __( 'Light Gray', 'friendly-business' ),
-				'slug'  => 'light-gray',
-				'color' => '#0d1b24', // $color__text-dark
-			),
+				'height'      => 180,
+				'width'       => 180,
+				'flex-width'  => true,
+				'flex-height' => false,
+				'header-text' => array( 'site-title' ),
+			)
+		);
 
 
+		// Editor color palette.
+		add_theme_support(
+			'editor-color-palette',
 			array(
 			array(
-				'name'  => __( 'White', 'friendly-business' ),
-				'slug'  => 'white',
-				'color' => '#ffffff',
-			),
-		)
-	);
-}
+				array(
+					'name'  => __( 'Primary', 'friendly-business' ),
+					'slug'  => 'primary',
+					'color' => '#20603c', // $color__link
+				),
+				array(
+					'name'  => __( 'Secondary', 'friendly-business' ),
+					'slug'  => 'secondary',
+					'color' => '#133a24', // $color__border-link-hover
+				),
+				array(
+					'name'  => __( 'Dark Gray', 'friendly-business' ),
+					'slug'  => 'dark-gray',
+					'color' => '#3c2323', // $color__text-main
+				),
+				array(
+					'name'  => __( 'Light Gray', 'friendly-business' ),
+					'slug'  => 'light-gray',
+					'color' => '#0d1b24', // $color__text-dark
+				),
+
+				array(
+					'name'  => __( 'White', 'friendly-business' ),
+					'slug'  => 'white',
+					'color' => '#ffffff',
+				),
+			)
+		);
+	}
 endif; // friendly_business_setup
 endif; // friendly_business_setup
 add_action( 'after_setup_theme', 'friendly_business_setup', 30 );
 add_action( 'after_setup_theme', 'friendly_business_setup', 30 );
 
 

+ 130 - 110
gazette/functions.php

@@ -13,7 +13,6 @@ if ( ! isset( $content_width ) ) {
 }
 }
 
 
 if ( ! function_exists( 'gazette_content_width' ) ) {
 if ( ! function_exists( 'gazette_content_width' ) ) {
-
 	function gazette_content_width() {
 	function gazette_content_width() {
 		global $content_width;
 		global $content_width;
 
 
@@ -21,104 +20,121 @@ if ( ! function_exists( 'gazette_content_width' ) ) {
 			$content_width = 869;
 			$content_width = 869;
 		}
 		}
 	}
 	}
-
 }
 }
 add_action( 'template_redirect', 'gazette_content_width' );
 add_action( 'template_redirect', 'gazette_content_width' );
 
 
 if ( ! function_exists( 'gazette_setup' ) ) :
 if ( ! function_exists( 'gazette_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 gazette_setup() {
-
-	/*
-	 * Make theme available for translation.
-	 * Translations can be filed in the /languages/ directory.
-	 * If you're building a theme based on Gazette, use a find and replace
-	 * to change 'gazette' to the name of your theme in all the template files
-	 */
-	load_theme_textdomain( 'gazette', get_template_directory() . '/languages' );
-
-	// Add default posts and comments RSS feed links to head.
-	add_theme_support( 'automatic-feed-links' );
-
-	/*
-	 * Let WordPress manage the document title.
-	 * By adding theme support, we declare that this theme does not use a
-	 * hard-coded <title> 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.
+	/**
+	 * Sets up theme defaults and registers support for various WordPress features.
 	 *
 	 *
-	 * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
-	 */
-	add_theme_support( 'post-thumbnails' );
-	add_image_size( 'gazette-post-thumbnail', 720, 426, true );
-	add_image_size( 'gazette-post-thumbnail-square', 720, 720, true );
-	add_image_size( 'gazette-featured-content-thumbnail', 960, 540, true );
-	add_image_size( 'gazette-single-thumbnail', 1920, 768, true );
-
-	// This theme uses wp_nav_menu() in two locations.
-	register_nav_menus( array(
-		'primary' => __( 'Primary Location', 'gazette' ),
-		'social'  => __( 'Social Location', 'gazette' ),
-	) );
-
-	/*
-	 * Switch default core markup for search form, comment form, and comments
-	 * to output valid HTML5.
+	 * 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.
 	 */
 	 */
-	add_theme_support( 'html5', array(
-		'search-form', 'comment-form', 'comment-list', 'gallery', 'caption',
-	) );
+	function gazette_setup() {
+
+		/*
+		 * Make theme available for translation.
+		 * Translations can be filed in the /languages/ directory.
+		 * If you're building a theme based on Gazette, use a find and replace
+		 * to change 'gazette' to the name of your theme in all the template files
+		 */
+		load_theme_textdomain( 'gazette', get_template_directory() . '/languages' );
+
+		// Add default posts and comments RSS feed links to head.
+		add_theme_support( 'automatic-feed-links' );
+
+		/*
+		 * Let WordPress manage the document title.
+		 * By adding theme support, we declare that this theme does not use a
+		 * hard-coded <title> 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 http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
+		 */
+		add_theme_support( 'post-thumbnails' );
+		add_image_size( 'gazette-post-thumbnail', 720, 426, true );
+		add_image_size( 'gazette-post-thumbnail-square', 720, 720, true );
+		add_image_size( 'gazette-featured-content-thumbnail', 960, 540, true );
+		add_image_size( 'gazette-single-thumbnail', 1920, 768, true );
+
+		// This theme uses wp_nav_menu() in two locations.
+		register_nav_menus(
+			array(
+				'primary' => __( 'Primary Location', 'gazette' ),
+				'social'  => __( 'Social Location', 'gazette' ),
+			)
+		);
 
 
-	/*
-	 * Enable support for Post Formats.
-	 * See http://codex.wordpress.org/Post_Formats
-	 */
-	add_theme_support( 'post-formats', array(
-		'image', 'video', 'link', 'gallery',
-	) );
+		/*
+		 * 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 support for responsive embeds.
-	add_theme_support( 'responsive-embeds' );
+		/*
+		 * Enable support for Post Formats.
+		 * See http://codex.wordpress.org/Post_Formats
+		 */
+		add_theme_support(
+			'post-formats',
+			array(
+				'image',
+				'video',
+				'link',
+				'gallery',
+			)
+		);
 
 
-	// Add support for custom color scheme.
-	add_theme_support( 'editor-color-palette', array(
-		array(
-			'name'  => esc_html__( 'Blue', 'gazette' ),
-			'slug'  => 'blue',
-			'color' => '#3863c1',
-		),
-		array(
-			'name'  => esc_html__( 'Dark Gray', 'gazette' ),
-			'slug'  => 'dark-gray',
-			'color' => '#222',
-		),
-		array(
-			'name'  => esc_html__( 'Medium Gray', 'gazette' ),
-			'slug'  => 'medium-gray',
-			'color' => '#777',
-		),
-		array(
-			'name'  => esc_html__( 'Light Gray', 'gazette' ),
-			'slug'  => 'light-gray',
-			'color' => '#ddd',
-		),
-		array(
-			'name'  => esc_html__( 'White', 'gazette' ),
-			'slug'  => 'white',
-			'color' => '#fff',
-		),
-	) );
-}
+		// Add support for responsive embeds.
+		add_theme_support( 'responsive-embeds' );
+
+		// Add support for custom color scheme.
+		add_theme_support(
+			'editor-color-palette',
+			array(
+				array(
+					'name'  => esc_html__( 'Blue', 'gazette' ),
+					'slug'  => 'blue',
+					'color' => '#3863c1',
+				),
+				array(
+					'name'  => esc_html__( 'Dark Gray', 'gazette' ),
+					'slug'  => 'dark-gray',
+					'color' => '#222',
+				),
+				array(
+					'name'  => esc_html__( 'Medium Gray', 'gazette' ),
+					'slug'  => 'medium-gray',
+					'color' => '#777',
+				),
+				array(
+					'name'  => esc_html__( 'Light Gray', 'gazette' ),
+					'slug'  => 'light-gray',
+					'color' => '#ddd',
+				),
+				array(
+					'name'  => esc_html__( 'White', 'gazette' ),
+					'slug'  => 'white',
+					'color' => '#fff',
+				),
+			)
+		);
+	}
 endif; // gazette_setup
 endif; // gazette_setup
 add_action( 'after_setup_theme', 'gazette_setup' );
 add_action( 'after_setup_theme', 'gazette_setup' );
 
 
@@ -128,25 +144,29 @@ add_action( 'after_setup_theme', 'gazette_setup' );
  * @link http://codex.wordpress.org/Function_Reference/register_sidebar
  * @link http://codex.wordpress.org/Function_Reference/register_sidebar
  */
  */
 function gazette_widgets_init() {
 function gazette_widgets_init() {
-	register_sidebar( array(
-		'name'          => __( 'Sidebar', 'gazette' ),
-		'id'            => 'sidebar-1',
-		'description'   => '',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => __( 'Footer', 'gazette' ),
-		'id'            => 'sidebar-2',
-		'description'   => '',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
+	register_sidebar(
+		array(
+			'name'          => __( 'Sidebar', 'gazette' ),
+			'id'            => 'sidebar-1',
+			'description'   => '',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => __( 'Footer', 'gazette' ),
+			'id'            => 'sidebar-2',
+			'description'   => '',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
 }
 }
 add_action( 'widgets_init', 'gazette_widgets_init' );
 add_action( 'widgets_init', 'gazette_widgets_init' );
 
 
@@ -183,7 +203,7 @@ function gazette_lato_inconsolata_fonts_url() {
 			'family' => urlencode( implode( '|', $font_families ) ),
 			'family' => urlencode( implode( '|', $font_families ) ),
 			'subset' => urlencode( 'latin,latin-ext' ), // add extra subset
 			'subset' => urlencode( 'latin,latin-ext' ), // add extra subset
 		);
 		);
-		$fonts_url = add_query_arg( $query_args, "https://fonts.googleapis.com/css" );
+		$fonts_url  = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
 	}
 	}
 
 
 	return $fonts_url;
 	return $fonts_url;

+ 0 - 1
hever/functions.php

@@ -22,7 +22,6 @@ if ( ! function_exists( 'varia_default_colors' ) ) {
 }
 }
 
 
 if ( ! function_exists( 'hever_setup' ) ) :
 if ( ! function_exists( 'hever_setup' ) ) :
-
 	/**
 	/**
 	 * Sets up theme defaults and registers support for various WordPress features.
 	 * Sets up theme defaults and registers support for various WordPress features.
 	 *
 	 *

+ 1 - 1
ibis/functions.php

@@ -68,4 +68,4 @@ function ibis_enqueue() {
 	wp_enqueue_style( 'mayland-fonts', ibis_fonts_url(), array(), null );
 	wp_enqueue_style( 'mayland-fonts', ibis_fonts_url(), array(), null );
 
 
 }
 }
-add_action( 'wp_enqueue_scripts', 'ibis_enqueue' );
+add_action( 'wp_enqueue_scripts', 'ibis_enqueue' );

+ 144 - 131
illustratr/functions.php

@@ -13,140 +13,151 @@ if ( ! isset( $content_width ) ) {
 }
 }
 
 
 if ( ! function_exists( 'illustratr_content_width' ) ) :
 if ( ! function_exists( 'illustratr_content_width' ) ) :
-/**
- * Adjust the content width for image post format and single portfolio.
- */
-function illustratr_content_width() {
-	global $content_width;
-
-	if ( 'image' == get_post_format() || ( is_singular() && 'jetpack-portfolio' == get_post_type() ) ) {
-		$content_width = 1100;
+	/**
+	 * Adjust the content width for image post format and single portfolio.
+	 */
+	function illustratr_content_width() {
+		global $content_width;
+		if ( 'image' == get_post_format() || ( is_singular() && 'jetpack-portfolio' == get_post_type() ) ) {
+			$content_width = 1100;
+		}
 	}
 	}
-}
 endif;
 endif;
 add_action( 'template_redirect', 'illustratr_content_width' );
 add_action( 'template_redirect', 'illustratr_content_width' );
 
 
 if ( ! function_exists( 'illustratr_setup' ) ) :
 if ( ! function_exists( 'illustratr_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 illustratr_setup() {
-
-	/*
-	 * Make theme available for translation.
-	 * Translations can be filed in the /languages/ directory.
-	 * If you're building a theme based on Illustratr, use a find and replace
-	 * to change 'illustratr' to the name of your theme in all the template files
-	 */
-	load_theme_textdomain( 'illustratr', get_template_directory() . '/languages' );
-
-	// Add default posts and comments RSS feed links to head.
-	add_theme_support( 'automatic-feed-links' );
-
-	/*
-	 * Let WordPress manage the document title.
-	 * By adding theme support, we declare that this theme does not use a
-	 * hard-coded <title> tag in the document head, and expect WordPress to
-	 * provide it for us.
-	 */
-	add_theme_support( 'title-tag' );
-
 	/**
 	/**
-	 * Editor styles.
+	 * 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.
 	 */
 	 */
-	add_editor_style( 'editor-style.css' );
+	function illustratr_setup() {
+
+		/*
+		 * Make theme available for translation.
+		 * Translations can be filed in the /languages/ directory.
+		 * If you're building a theme based on Illustratr, use a find and replace
+		 * to change 'illustratr' to the name of your theme in all the template files
+		 */
+		load_theme_textdomain( 'illustratr', get_template_directory() . '/languages' );
+
+		// Add default posts and comments RSS feed links to head.
+		add_theme_support( 'automatic-feed-links' );
+
+		/*
+		 * Let WordPress manage the document title.
+		 * By adding theme support, we declare that this theme does not use a
+		 * hard-coded <title> tag in the document head, and expect WordPress to
+		 * provide it for us.
+		 */
+		add_theme_support( 'title-tag' );
+
+		/**
+		 * Editor styles.
+		 */
+		add_editor_style( 'editor-style.css' );
+
+		/**
+		 * Responsive embeds
+		 */
+		add_theme_support( 'responsive-embeds' );
+
+		/**
+		 * Gutenberg wide and full images support
+		 */
+		add_theme_support( 'align-wide' );
+
+		// Add custom colors to Gutenberg
+		add_theme_support(
+			'editor-color-palette',
+			array(
+				array(
+					'name'  => esc_html__( 'Black', 'illustratr' ),
+					'slug'  => 'black',
+					'color' => '#24282d',
+				),
+				array(
+					'name'  => esc_html__( 'Dark Gray', 'illustratr' ),
+					'slug'  => 'dark-gray',
+					'color' => '#464d4d',
+				),
+				array(
+					'name'  => esc_html__( 'Medium Gray', 'illustratr' ),
+					'slug'  => 'medium-gray',
+					'color' => '#7f8d8c',
+				),
+				array(
+					'name'  => esc_html__( 'Light Gray', 'illustratr' ),
+					'slug'  => 'light-gray',
+					'color' => '#f1f2f3',
+				),
+				array(
+					'name'  => esc_html__( 'White', 'illustratr' ),
+					'slug'  => 'white',
+					'color' => '#ffffff',
+				),
+				array(
+					'name'  => esc_html__( 'Red', 'illustratr' ),
+					'slug'  => 'red',
+					'color' => '#e06d5e',
+				),
+				array(
+					'name'  => esc_html__( 'Dark Red', 'illustratr' ),
+					'slug'  => 'dark-red',
+					'color' => '#b44738',
+				),
+			)
+		);
 
 
-	/**
-	 * Responsive embeds
-	 */
-	add_theme_support( 'responsive-embeds' );
+		/*
+		 * 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' );
+		set_post_thumbnail_size( 400, 300, true );
+		add_image_size( 'illustratr-featured-image', 1100, 500, true );
+		add_image_size( 'illustratr-portfolio-featured-image', 800, 9999 );
+
+		// This theme uses wp_nav_menu() in two locations.
+		register_nav_menus(
+			array(
+				'primary' => __( 'Primary Menu', 'illustratr' ),
+				'social'  => __( 'Social Menu', 'illustratr' ),
+			)
+		);
 
 
-	/**
-	 * Gutenberg wide and full images support
-	 */
-	add_theme_support( 'align-wide' );
+		// Enable support for Post Formats.
+		add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio' ) );
+
+		// Setup the WordPress core custom background feature.
+		add_theme_support(
+			'custom-background',
+			apply_filters(
+				'illustratr_custom_background_args',
+				array(
+					'default-color' => '24282d',
+					'default-image' => '',
+				)
+			)
+		);
 
 
-	// Add custom colors to Gutenberg
-	add_theme_support(
-		'editor-color-palette', array(
-			array(
-				'name'  => esc_html__( 'Black', 'illustratr' ),
-				'slug' => 'black',
-				'color' => '#24282d',
-			),
-			array(
-				'name'  => esc_html__( 'Dark Gray', 'illustratr' ),
-				'slug' => 'dark-gray',
-				'color' => '#464d4d',
-			),
-			array(
-				'name'  => esc_html__( 'Medium Gray', 'illustratr' ),
-				'slug' => 'medium-gray',
-				'color' => '#7f8d8c',
-			),
-			array(
-				'name'  => esc_html__( 'Light Gray', 'illustratr' ),
-				'slug' => 'light-gray',
-				'color' => '#f1f2f3',
-			),
+		// Enable support for HTML5 markup.
+		add_theme_support(
+			'html5',
 			array(
 			array(
-				'name'  => esc_html__( 'White', 'illustratr' ),
-				'slug' => 'white',
-				'color' => '#ffffff',
-			),
-			array(
-				'name'  => esc_html__( 'Red', 'illustratr' ),
-				'slug' => 'red',
-				'color' => '#e06d5e',
-			),
-			array(
-				'name'  => esc_html__( 'Dark Red', 'illustratr' ),
-				'slug' => 'dark-red',
-				'color' => '#b44738',
+				'comment-list',
+				'search-form',
+				'comment-form',
+				'gallery',
 			)
 			)
-		)
-	);
+		);
 
 
-	/*
-	 * 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' );
-	set_post_thumbnail_size( 400, 300, true );
-	add_image_size( 'illustratr-featured-image', 1100, 500, true );
-	add_image_size( 'illustratr-portfolio-featured-image', 800, 9999 );
-
-	// This theme uses wp_nav_menu() in two locations.
-	register_nav_menus( array(
-		'primary' => __( 'Primary Menu', 'illustratr' ),
-		'social'  => __( 'Social Menu', 'illustratr' ),
-	) );
-
-	// Enable support for Post Formats.
-	add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio' ) );
-
-	// Setup the WordPress core custom background feature.
-	add_theme_support( 'custom-background', apply_filters( 'illustratr_custom_background_args', array(
-		'default-color' => '24282d',
-		'default-image' => '',
-	) ) );
-
-	// Enable support for HTML5 markup.
-	add_theme_support( 'html5', array(
-		'comment-list',
-		'search-form',
-		'comment-form',
-		'gallery',
-	) );
-
-	// Add support for responsive embeds.
-	add_theme_support( 'responsive-embeds' );
-}
+		// Add support for responsive embeds.
+		add_theme_support( 'responsive-embeds' );
+	}
 endif; // illustratr_setup
 endif; // illustratr_setup
 add_action( 'after_setup_theme', 'illustratr_setup' );
 add_action( 'after_setup_theme', 'illustratr_setup' );
 
 
@@ -154,15 +165,17 @@ add_action( 'after_setup_theme', 'illustratr_setup' );
  * Register widgetized area and update sidebar with default widgets.
  * Register widgetized area and update sidebar with default widgets.
  */
  */
 function illustratr_widgets_init() {
 function illustratr_widgets_init() {
-	register_sidebar( array(
-		'name'          => __( 'Footer', 'illustratr' ),
-		'id'            => 'sidebar-1',
-		'description'   => __( 'Hidden footer area that is revealed by the + button at the bottom of each page', 'illustratr' ),
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h1 class="widget-title">',
-		'after_title'   => '</h1>',
-	) );
+	register_sidebar(
+		array(
+			'name'          => __( 'Footer', 'illustratr' ),
+			'id'            => 'sidebar-1',
+			'description'   => __( 'Hidden footer area that is revealed by the + button at the bottom of each page', 'illustratr' ),
+			'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', 'illustratr_widgets_init' );
 add_action( 'widgets_init', 'illustratr_widgets_init' );
 
 
@@ -295,7 +308,7 @@ add_action( 'wp_enqueue_scripts', 'illustratr_scripts' );
  * Gutenberg Editor Styles
  * Gutenberg Editor Styles
  */
  */
 function apostrophe_2_editor_styles() {
 function apostrophe_2_editor_styles() {
-	wp_enqueue_style( 'illustratr-editor-block-style', get_template_directory_uri() . '/editor-blocks.css');
+	wp_enqueue_style( 'illustratr-editor-block-style', get_template_directory_uri() . '/editor-blocks.css' );
 	wp_enqueue_style( 'illustratr-source-sans-pro', illustratr_source_sans_pro_font_url(), array(), null );
 	wp_enqueue_style( 'illustratr-source-sans-pro', illustratr_source_sans_pro_font_url(), array(), null );
 	wp_enqueue_style( 'illustratr-pt-serif', illustratr_pt_serif_font_url(), array(), null );
 	wp_enqueue_style( 'illustratr-pt-serif', illustratr_pt_serif_font_url(), array(), null );
 	wp_enqueue_style( 'illustratr-source-code-pro', illustratr_source_code_pro_font_url(), array(), null );
 	wp_enqueue_style( 'illustratr-source-code-pro', illustratr_source_code_pro_font_url(), array(), null );

+ 200 - 169
independent-publisher-2/functions.php

@@ -6,138 +6,155 @@
  */
  */
 
 
 if ( ! function_exists( 'independent_publisher_2_setup' ) ) :
 if ( ! function_exists( 'independent_publisher_2_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 independent_publisher_2_setup() {
-	/*
-	 * Make theme available for translation.
-	 * Translations can be filed in the /languages/ directory.
-	 * If you're building a theme based on Independent Publisher 2, use a find and replace
-	 * to change 'independent-publisher-2' to the name of your theme in all the template files
-	 */
-	load_theme_textdomain( 'independent-publisher-2', get_template_directory() . '/languages' );
-
-	// Add default posts and comments RSS feed links to head.
-	add_theme_support( 'automatic-feed-links' );
-
-	/*
-	 * Let WordPress manage the document title.
-	 * By adding theme support, we declare that this theme does not use a
-	 * hard-coded <title> tag in the document head, and expect WordPress to
-	 * provide it for us.
-	 */
-	add_theme_support( 'title-tag' );
-
-
-	add_theme_support( 'customize_selective_refresh_widgets' );
-
-	/*
-	 * 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' );
-	set_post_thumbnail_size( 740, 430, true );
-	add_image_size( 'independent-publisher-2-banner', 1440, 600, true );
-	add_image_size( 'independent-publisher-2-full-width', 1100, 9999 );
-
-	// This theme uses wp_nav_menu() in one location.
-	register_nav_menus( array(
-		'menu-1' => esc_html__( 'Header', 'independent-publisher-2' ),
-	) );
-
 	/**
 	/**
-	 * Add custom logo support
-	 */
-	add_theme_support( 'custom-logo', array(
-		'height'      => 300,
-		'width'       => 1500,
-		'flex-width'  => true,
-	) );
-
-	/*
-	 * Switch default core markup for search form, comment form, and comments
-	 * to output valid HTML5.
+	 * 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.
 	 */
 	 */
-	add_theme_support( 'html5', array(
-		'search-form',
-		'comment-form',
-		'comment-list',
-		'gallery',
-		'caption',
-	) );
-
-	// Set up the WordPress core custom background feature.
-	add_theme_support( 'custom-background', apply_filters( 'independent_publisher_2_custom_background_args', array(
-		'default-color' => 'ffffff',
-	) ) );
 
 
-	// Load regular editor styles into the new block-based editor.
-	add_theme_support( 'editor-styles' );
-
-	// Add support for Block Styles.
-	add_theme_support( 'wp-block-styles' );
-
-	// Add support for responsive embeds.
-	add_theme_support( 'responsive-embeds' );
-
-	// Add support for full and wide align images.
-	add_theme_support( 'align-wide' );
-
-	// Add support for custom color scheme.
-	add_theme_support( 'editor-color-palette', array(
-		array(
-			'name'  => __( 'Medium Blue', 'independent-publisher-2' ),
-			'slug'  => 'medium-blue',
-			'color' => '#0087be',
-		),
-		array(
-			'name'  => __( 'Bright Blue', 'independent-publisher-2' ),
-			'slug'  => 'bright-blue',
-			'color' => '#00aadc',
-		),
-		array(
-			'name'  => __( 'Dark Gray', 'independent-publisher-2' ),
-			'slug'  => 'dark-gray',
-			'color' => '#4d4d4b',
-		),
-		array(
-			'name'  => __( 'Light Gray', 'independent-publisher-2' ),
-			'slug'  => 'light-gray',
-			'color' => '#b3b3b1',
-		),
-		array(
-			'name'  => __( 'White', 'independent-publisher-2' ),
-			'slug'  => 'white',
-			'color' => '#fff',
-		),
-	) );
-}
+	function independent_publisher_2_setup() {
+		/*
+		 * Make theme available for translation.
+		 * Translations can be filed in the /languages/ directory.
+		 * If you're building a theme based on Independent Publisher 2, use a find and replace
+		 * to change 'independent-publisher-2' to the name of your theme in all the template files
+		 */
+		load_theme_textdomain( 'independent-publisher-2', get_template_directory() . '/languages' );
+
+		// Add default posts and comments RSS feed links to head.
+		add_theme_support( 'automatic-feed-links' );
+
+		/*
+		 * Let WordPress manage the document title.
+		 * By adding theme support, we declare that this theme does not use a
+		 * hard-coded <title> tag in the document head, and expect WordPress to
+		 * provide it for us.
+		 */
+		add_theme_support( 'title-tag' );
+
+		add_theme_support( 'customize_selective_refresh_widgets' );
+
+		/*
+		 * 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' );
+		set_post_thumbnail_size( 740, 430, true );
+		add_image_size( 'independent-publisher-2-banner', 1440, 600, true );
+		add_image_size( 'independent-publisher-2-full-width', 1100, 9999 );
+
+		// This theme uses wp_nav_menu() in one location.
+		register_nav_menus(
+			array(
+				'menu-1' => esc_html__( 'Header', 'independent-publisher-2' ),
+			)
+		);
+
+		/**
+		 * Add custom logo support
+		 */
+		add_theme_support(
+			'custom-logo',
+			array(
+				'height'     => 300,
+				'width'      => 1500,
+				'flex-width' => true,
+			)
+		);
+
+		/*
+		 * 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',
+			)
+		);
+
+		// Set up the WordPress core custom background feature.
+		add_theme_support(
+			'custom-background',
+			apply_filters(
+				'independent_publisher_2_custom_background_args',
+				array(
+					'default-color' => 'ffffff',
+				)
+			)
+		);
+
+		// Load regular editor styles into the new block-based editor.
+		add_theme_support( 'editor-styles' );
+
+		// Add support for Block Styles.
+		add_theme_support( 'wp-block-styles' );
+
+		// Add support for responsive embeds.
+		add_theme_support( 'responsive-embeds' );
+
+		// Add support for full and wide align images.
+		add_theme_support( 'align-wide' );
+
+		// Add support for custom color scheme.
+		add_theme_support(
+			'editor-color-palette',
+			array(
+				array(
+					'name'  => __( 'Medium Blue', 'independent-publisher-2' ),
+					'slug'  => 'medium-blue',
+					'color' => '#0087be',
+				),
+				array(
+					'name'  => __( 'Bright Blue', 'independent-publisher-2' ),
+					'slug'  => 'bright-blue',
+					'color' => '#00aadc',
+				),
+				array(
+					'name'  => __( 'Dark Gray', 'independent-publisher-2' ),
+					'slug'  => 'dark-gray',
+					'color' => '#4d4d4b',
+				),
+				array(
+					'name'  => __( 'Light Gray', 'independent-publisher-2' ),
+					'slug'  => 'light-gray',
+					'color' => '#b3b3b1',
+				),
+				array(
+					'name'  => __( 'White', 'independent-publisher-2' ),
+					'slug'  => 'white',
+					'color' => '#fff',
+				),
+			)
+		);
+	}
 endif; // independent_publisher_2_setup
 endif; // independent_publisher_2_setup
 add_action( 'after_setup_theme', 'independent_publisher_2_setup' );
 add_action( 'after_setup_theme', 'independent_publisher_2_setup' );
 
 
 if ( ! function_exists( 'independent_publisher_2_word_count' ) ) :
 if ( ! function_exists( 'independent_publisher_2_word_count' ) ) :
-/**
- * Gets the number of words in the post content.
- *
- * @link http://php.net/str_word_count
- * @link http://php.net/number_format
- */
-function independent_publisher_2_word_count() {
-	$content = get_post_field( 'post_content', get_the_ID() );
-	$count   = str_word_count( strip_tags( $content ) );
-	$time    = $count / 250; //Roughly 250 wpm reading time
-	// if time less than 1 explicitly set to 1.
-	if( $time < 1 ) {
-		$time = 1;
+	/**
+	 * Gets the number of words in the post content.
+	 *
+	 * @link http://php.net/str_word_count
+	 * @link http://php.net/number_format
+	 */
+	function independent_publisher_2_word_count() {
+		$content = get_post_field( 'post_content', get_the_ID() );
+		$count   = str_word_count( strip_tags( $content ) );
+		$time    = $count / 250; //Roughly 250 wpm reading time
+		// if time less than 1 explicitly set to 1.
+		if ( $time < 1 ) {
+			$time = 1;
+		}
+		return number_format( $time );
 	}
 	}
-	return number_format( $time );
-}
 endif; // independent_publisher_2_word_count
 endif; // independent_publisher_2_word_count
 
 
 /**
 /**
@@ -158,42 +175,50 @@ add_action( 'after_setup_theme', 'independent_publisher_2_content_width', 0 );
  * @link http://codex.wordpress.org/Function_Reference/register_sidebar
  * @link http://codex.wordpress.org/Function_Reference/register_sidebar
  */
  */
 function independent_publisher_2_widgets_init() {
 function independent_publisher_2_widgets_init() {
-	register_sidebar( array(
-		'name'          => esc_html__( 'Sidebar', 'independent-publisher-2' ),
-		'id'            => 'sidebar-1',
-		'description'   => '',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h1 class="widget-title">',
-		'after_title'   => '</h1>',
-	) );
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 1', 'independent-publisher-2' ),
-		'id'            => 'sidebar-2',
-		'description'   => '',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h1 class="widget-title">',
-		'after_title'   => '</h1>',
-	) );
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 2', 'independent-publisher-2' ),
-		'id'            => 'sidebar-3',
-		'description'   => '',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h1 class="widget-title">',
-		'after_title'   => '</h1>',
-	) );
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 3', 'independent-publisher-2' ),
-		'id'            => 'sidebar-4',
-		'description'   => '',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h1 class="widget-title">',
-		'after_title'   => '</h1>',
-	) );
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Sidebar', 'independent-publisher-2' ),
+			'id'            => 'sidebar-1',
+			'description'   => '',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h1 class="widget-title">',
+			'after_title'   => '</h1>',
+		)
+	);
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 1', 'independent-publisher-2' ),
+			'id'            => 'sidebar-2',
+			'description'   => '',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h1 class="widget-title">',
+			'after_title'   => '</h1>',
+		)
+	);
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 2', 'independent-publisher-2' ),
+			'id'            => 'sidebar-3',
+			'description'   => '',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h1 class="widget-title">',
+			'after_title'   => '</h1>',
+		)
+	);
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 3', 'independent-publisher-2' ),
+			'id'            => 'sidebar-4',
+			'description'   => '',
+			'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', 'independent_publisher_2_widgets_init' );
 add_action( 'widgets_init', 'independent_publisher_2_widgets_init' );
 
 
@@ -217,17 +242,20 @@ function independent_publisher_2_scripts() {
 	}
 	}
 
 
 	// If there's an active Video widget, and it's (hopefully) in the footer widget area
 	// If there's an active Video widget, and it's (hopefully) in the footer widget area
-	if ( is_active_widget( '','', 'media_video' ) && ( is_active_sidebar( 'sidebar-2' ) || is_active_sidebar( 'sidebar-3' ) || is_active_sidebar( 'sidebar-4' ) ) ) {
+	if ( is_active_widget( '', '', 'media_video' ) && ( is_active_sidebar( 'sidebar-2' ) || is_active_sidebar( 'sidebar-3' ) || is_active_sidebar( 'sidebar-4' ) ) ) {
 		wp_enqueue_script( 'independent-publisher-2-video-widget', get_template_directory_uri() . '/js/video-widget.js', array(), '20210111', true );
 		wp_enqueue_script( 'independent-publisher-2-video-widget', get_template_directory_uri() . '/js/video-widget.js', array(), '20210111', true );
 	}
 	}
 
 
 	wp_enqueue_script( 'independent-publisher-2-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20170315', true );
 	wp_enqueue_script( 'independent-publisher-2-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20170315', true );
 
 
 	if ( independent_publisher_2_has_header_image() ) {
 	if ( independent_publisher_2_has_header_image() ) {
-		wp_add_inline_style( 'independent-publisher-2-style', sprintf(
-			'#hero-header { background: url("%s") no-repeat center; background-size: cover; background-attachment: scroll; }',
-			esc_url( get_header_image() )
-		) );
+		wp_add_inline_style(
+			'independent-publisher-2-style',
+			sprintf(
+				'#hero-header { background: url("%s") no-repeat center; background-size: cover; background-attachment: scroll; }',
+				esc_url( get_header_image() )
+			)
+		);
 	}
 	}
 
 
 	if ( is_singular() ) {
 	if ( is_singular() ) {
@@ -250,10 +278,13 @@ function independent_publisher_2_scripts() {
 			//Grab the first URL
 			//Grab the first URL
 			$banner = $banner_matches[0][0];
 			$banner = $banner_matches[0][0];
 
 
-			wp_add_inline_style( 'independent-publisher-2-style', sprintf(
-				'#hero-header { background: url("%s") no-repeat center; background-size: cover; background-attachment: scroll; }',
-				esc_url( $banner )
-			) );
+			wp_add_inline_style(
+				'independent-publisher-2-style',
+				sprintf(
+					'#hero-header { background: url("%s") no-repeat center; background-size: cover; background-attachment: scroll; }',
+					esc_url( $banner )
+				)
+			);
 		}
 		}
 	}
 	}
 }
 }

+ 176 - 150
intergalactic-2/functions.php

@@ -19,122 +19,140 @@ add_action( 'after_setup_theme', 'intergalactic_2_content_width', 0 );
 
 
 
 
 if ( ! function_exists( 'intergalactic_2_setup' ) ) :
 if ( ! function_exists( 'intergalactic_2_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 intergalactic_2_setup() {
-
-	/*
-	 * Make theme available for translation.
-	 * Translations can be filed in the /languages/ directory.
-	 * If you're building a theme based on Intergalactic 2, use a find and replace
-	 * to change 'intergalactic-2' to the name of your theme in all the template files
-	 */
-	load_theme_textdomain( 'intergalactic-2', get_template_directory() . '/languages' );
-
-	// Add default posts and comments RSS feed links to head.
-	add_theme_support( 'automatic-feed-links' );
-
-	/*
-	 * Let WordPress manage the document title.
-	 * By adding theme support, we declare that this theme does not use a
-	 * hard-coded <title> tag in the document head, and expect WordPress to
-	 * provide it for us.
-	 */
-	add_theme_support( 'title-tag' );
-
-	// Add support for responsive embeds.
-	add_theme_support( 'responsive-embeds' );
-
 	/**
 	/**
-	 * Gutenberg wide and full images support
+	 * 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.
 	 */
 	 */
-	add_theme_support( 'align-wide' );
-
- 	// Add custom colors to Gutenberg
-	add_theme_support(
-		'editor-color-palette', array(
+	function intergalactic_2_setup() {
+		/*
+		 * Make theme available for translation.
+		 * Translations can be filed in the /languages/ directory.
+		 * If you're building a theme based on Intergalactic 2, use a find and replace
+		 * to change 'intergalactic-2' to the name of your theme in all the template files
+		 */
+		load_theme_textdomain( 'intergalactic-2', get_template_directory() . '/languages' );
+
+		// Add default posts and comments RSS feed links to head.
+		add_theme_support( 'automatic-feed-links' );
+
+		/*
+		 * Let WordPress manage the document title.
+		 * By adding theme support, we declare that this theme does not use a
+		 * hard-coded <title> tag in the document head, and expect WordPress to
+		 * provide it for us.
+		 */
+		add_theme_support( 'title-tag' );
+
+		// Add support for responsive embeds.
+		add_theme_support( 'responsive-embeds' );
+
+		/**
+		 * Gutenberg wide and full images support
+		 */
+		add_theme_support( 'align-wide' );
+
+		// Add custom colors to Gutenberg
+		add_theme_support(
+			'editor-color-palette',
 			array(
 			array(
-				'name'  => esc_html__( 'Black', 'intergalactic-2' ),
-				'slug' => 'black',
-				'color' => '#222222',
-			),
-			array(
-				'name'  => esc_html__( 'Dark Gray', 'intergalactic-2' ),
-				'slug' => 'dark-gray',
-				'color' => '#333333',
-			),
-			array(
-				'name'  => esc_html__( 'Light Gray', 'intergalactic-2' ),
-				'slug' => 'light-gray',
-				'color' => '#cccccc',
-			),
-			array(
-				'name'  => esc_html__( 'White', 'intergalactic-2' ),
-				'slug' => 'white',
-				'color' => '#ffffff',
-			),
-			array(
-				'name'  => esc_html__( 'Purple', 'intergalactic-2' ),
-				'slug' => 'purple',
-				'color' => '#81699b',
-			),
+				array(
+					'name'  => esc_html__( 'Black', 'intergalactic-2' ),
+					'slug'  => 'black',
+					'color' => '#222222',
+				),
+				array(
+					'name'  => esc_html__( 'Dark Gray', 'intergalactic-2' ),
+					'slug'  => 'dark-gray',
+					'color' => '#333333',
+				),
+				array(
+					'name'  => esc_html__( 'Light Gray', 'intergalactic-2' ),
+					'slug'  => 'light-gray',
+					'color' => '#cccccc',
+				),
+				array(
+					'name'  => esc_html__( 'White', 'intergalactic-2' ),
+					'slug'  => 'white',
+					'color' => '#ffffff',
+				),
+				array(
+					'name'  => esc_html__( 'Purple', 'intergalactic-2' ),
+					'slug'  => 'purple',
+					'color' => '#81699b',
+				),
+				array(
+					'name'  => esc_html__( 'Dark Purple', 'intergalactic-2' ),
+					'slug'  => 'dark-purple',
+					'color' => '#553a72',
+				),
+				array(
+					'name'  => esc_html__( 'Dark Green', 'intergalactic-2' ),
+					'slug'  => 'dark-green',
+					'color' => '#557d73',
+				),
+			)
+		);
+
+		/*
+		 * 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' );
+		add_image_size( 'intergalactic-2-large', '1440', '960', false );
+
+		// Enable support for custom logo.
+		add_theme_support(
+			'custom-logo',
 			array(
 			array(
-				'name'  => esc_html__( 'Dark Purple', 'intergalactic-2' ),
-				'slug' => 'dark-purple',
-				'color' => '#553a72',
-			),
+				'height'      => 400,
+				'width'       => 1200,
+				'flex-height' => true,
+				'flex-width'  => true,
+			)
+		);
+
+		// This theme uses wp_nav_menu() in two locations.
+		register_nav_menus(
 			array(
 			array(
-				'name'  => esc_html__( 'Dark Green', 'intergalactic-2' ),
-				'slug' => 'dark-green',
-				'color' => '#557d73',
-			),
-		)
-	);
+				'menu-1' => esc_html__( 'Slide-Out Menu', 'intergalactic-2' ),
+			)
+		);
 
 
-	/*
-	 * 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' );
-	add_image_size( 'intergalactic-2-large', '1440', '960', false );
-
-	// Enable support for custom logo.
-	add_theme_support( 'custom-logo', array(
-		'height'      => 400,
-		'width'       => 1200,
-		'flex-height' => true,
-		'flex-width'  => true
-	) );
-
-	// This theme uses wp_nav_menu() in two locations.
-	register_nav_menus( array(
-		'menu-1' => esc_html__( 'Slide-Out Menu', 'intergalactic-2' ),
-	) );
-
-	/*
-	 * 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',
-	) );
+		/*
+		 * 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',
+			)
+		);
 
 
-	// Setup the WordPress core custom background feature.
-	add_theme_support( 'custom-background', apply_filters( 'intergalactic_2_custom_background_args', array(
-		'default-color' => 'ffffff',
-		'default-image' => '',
-	) ) );
+		// Setup the WordPress core custom background feature.
+		add_theme_support(
+			'custom-background',
+			apply_filters(
+				'intergalactic_2_custom_background_args',
+				array(
+					'default-color' => 'ffffff',
+					'default-image' => '',
+				)
+			)
+		);
 
 
-	// Add theme support for selective refresh for widgets.
-	add_theme_support( 'customize-selective-refresh-widgets' );
+		// Add theme support for selective refresh for widgets.
+		add_theme_support( 'customize-selective-refresh-widgets' );
 
 
-}
+	}
 endif; // intergalactic_2_setup
 endif; // intergalactic_2_setup
 add_action( 'after_setup_theme', 'intergalactic_2_setup' );
 add_action( 'after_setup_theme', 'intergalactic_2_setup' );
 
 
@@ -144,39 +162,47 @@ add_action( 'after_setup_theme', 'intergalactic_2_setup' );
  * @link http://codex.wordpress.org/Function_Reference/register_sidebar
  * @link http://codex.wordpress.org/Function_Reference/register_sidebar
  */
  */
 function intergalactic_2_widgets_init() {
 function intergalactic_2_widgets_init() {
-	register_sidebar( array(
-		'name'          => esc_html__( 'Sidebar', 'intergalactic-2' ),
-		'id'            => 'sidebar-1',
-		'description'   => '',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h1 class="widget-title">',
-		'after_title'   => '</h1>',
-	) );
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 1', 'intergalactic-2' ),
-		'id'            => 'sidebar-2',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h1 class="widget-title">',
-		'after_title'   => '</h1>',
-	) );
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 2', 'intergalactic-2' ),
-		'id'            => 'sidebar-3',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h1 class="widget-title">',
-		'after_title'   => '</h1>',
-	) );
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 3', 'intergalactic-2' ),
-		'id'            => 'sidebar-4',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h1 class="widget-title">',
-		'after_title'   => '</h1>',
-	) );
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Sidebar', 'intergalactic-2' ),
+			'id'            => 'sidebar-1',
+			'description'   => '',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h1 class="widget-title">',
+			'after_title'   => '</h1>',
+		)
+	);
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 1', 'intergalactic-2' ),
+			'id'            => 'sidebar-2',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h1 class="widget-title">',
+			'after_title'   => '</h1>',
+		)
+	);
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 2', 'intergalactic-2' ),
+			'id'            => 'sidebar-3',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h1 class="widget-title">',
+			'after_title'   => '</h1>',
+		)
+	);
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 3', 'intergalactic-2' ),
+			'id'            => 'sidebar-4',
+			'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', 'intergalactic_2_widgets_init' );
 add_action( 'widgets_init', 'intergalactic_2_widgets_init' );
 
 
@@ -207,7 +233,7 @@ add_action( 'wp_enqueue_scripts', 'intergalactic_2_scripts' );
  * Gutenberg Editor Styles
  * Gutenberg Editor Styles
  */
  */
 function intergalactic_2_editor_styles() {
 function intergalactic_2_editor_styles() {
-	wp_enqueue_style( 'intergalactic-2-editor-block-style', get_template_directory_uri() . '/editor-blocks.css');
+	wp_enqueue_style( 'intergalactic-2-editor-block-style', get_template_directory_uri() . '/editor-blocks.css' );
 	wp_enqueue_style( 'intergalactic-2-lato', intergalactic_2_fonts_url() );
 	wp_enqueue_style( 'intergalactic-2-lato', intergalactic_2_fonts_url() );
 	wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.3' );
 	wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.3' );
 }
 }
@@ -217,16 +243,16 @@ add_action( 'enqueue_block_editor_assets', 'intergalactic_2_editor_styles' );
  * Register Google Fonts
  * Register Google Fonts
  */
  */
 function intergalactic_2_fonts_url() {
 function intergalactic_2_fonts_url() {
-    $fonts_url = '';
+	$fonts_url = '';
 
 
-    /* Translators: If there are characters in your language that are not
+	/* Translators: If there are characters in your language that are not
 	 * supported by Lato, translate this to 'off'. Do not translate
 	 * supported by Lato, translate this to 'off'. Do not translate
 	 * into your own language.
 	 * into your own language.
 	 */
 	 */
 	$arimo = esc_html_x( 'on', 'Lato font: on or off', 'intergalactic-2' );
 	$arimo = esc_html_x( 'on', 'Lato font: on or off', 'intergalactic-2' );
 
 
 	if ( 'off' !== $arimo ) {
 	if ( 'off' !== $arimo ) {
-		$font_families = array();
+		$font_families   = array();
 		$font_families[] = 'Lato:300,400,700,300italic,400italic,700italic&subset=latin,latin-ext';
 		$font_families[] = 'Lato:300,400,700,300italic,400italic,700italic&subset=latin,latin-ext';
 
 
 		$query_args = array(
 		$query_args = array(
@@ -242,12 +268,12 @@ function intergalactic_2_fonts_url() {
 }
 }
 
 
 if ( ! function_exists( 'intergalactic_2_continue_reading_link' ) ) :
 if ( ! function_exists( 'intergalactic_2_continue_reading_link' ) ) :
-/**
- * Returns an ellipsis and "Continue reading" plus off-screen title link for excerpts
- */
-function intergalactic_2_continue_reading_link() {
-	return '<a href="'. esc_url( get_permalink() ) . '" class="more-link">' . sprintf( __( 'Read More <span class="screen-reader-text">%1$s</span>', 'intergalactic-2' ), esc_attr( strip_tags( get_the_title() ) ) ) . '</a>';
-}
+	/**
+	 * Returns an ellipsis and "Continue reading" plus off-screen title link for excerpts
+	 */
+	function intergalactic_2_continue_reading_link() {
+		return '<a href="' . esc_url( get_permalink() ) . '" class="more-link">' . sprintf( __( 'Read More <span class="screen-reader-text">%1$s</span>', 'intergalactic-2' ), esc_attr( strip_tags( get_the_title() ) ) ) . '</a>';
+	}
 endif; // intergalactic_2_continue_reading_link
 endif; // intergalactic_2_continue_reading_link
 
 
 /**
 /**

+ 108 - 81
ixion/functions.php

@@ -8,6 +8,7 @@
  */
  */
 
 
 if ( ! function_exists( 'ixion_setup' ) ) :
 if ( ! function_exists( 'ixion_setup' ) ) :
+
 	/**
 	/**
 	 * Sets up theme defaults and registers support for various WordPress features.
 	 * Sets up theme defaults and registers support for various WordPress features.
 	 *
 	 *
@@ -37,40 +38,41 @@ if ( ! function_exists( 'ixion_setup' ) ) :
 		add_theme_support( 'align-wide' );
 		add_theme_support( 'align-wide' );
 		// Add custom colors to Gutenberg
 		// Add custom colors to Gutenberg
 		add_theme_support(
 		add_theme_support(
-			'editor-color-palette', array(
+			'editor-color-palette',
+			array(
 				array(
 				array(
 					'name'  => esc_html__( 'Black', 'ixion' ),
 					'name'  => esc_html__( 'Black', 'ixion' ),
-					'slug' => 'black',
+					'slug'  => 'black',
 					'color' => '#192930',
 					'color' => '#192930',
 				),
 				),
 				array(
 				array(
 					'name'  => esc_html__( 'Dark Gray', 'ixion' ),
 					'name'  => esc_html__( 'Dark Gray', 'ixion' ),
-					'slug' => 'dark-gray',
+					'slug'  => 'dark-gray',
 					'color' => '#474f53',
 					'color' => '#474f53',
 				),
 				),
 				array(
 				array(
 					'name'  => esc_html__( 'Medium Gray', 'ixion' ),
 					'name'  => esc_html__( 'Medium Gray', 'ixion' ),
-					'slug' => 'medium-gray',
+					'slug'  => 'medium-gray',
 					'color' => '#a5a29d',
 					'color' => '#a5a29d',
 				),
 				),
 				array(
 				array(
 					'name'  => esc_html__( 'Light Gray', 'ixion' ),
 					'name'  => esc_html__( 'Light Gray', 'ixion' ),
-					'slug' => 'light-gray',
+					'slug'  => 'light-gray',
 					'color' => '#eeece8',
 					'color' => '#eeece8',
 				),
 				),
 				array(
 				array(
 					'name'  => esc_html__( 'White', 'ixion' ),
 					'name'  => esc_html__( 'White', 'ixion' ),
-					'slug' => 'white',
+					'slug'  => 'white',
 					'color' => '#ffffff',
 					'color' => '#ffffff',
 				),
 				),
 				array(
 				array(
 					'name'  => esc_html__( 'Yellow', 'ixion' ),
 					'name'  => esc_html__( 'Yellow', 'ixion' ),
-					'slug' => 'yellow',
+					'slug'  => 'yellow',
 					'color' => '#d7b221',
 					'color' => '#d7b221',
 				),
 				),
 				array(
 				array(
 					'name'  => esc_html__( 'Dark Yellow', 'ixion' ),
 					'name'  => esc_html__( 'Dark Yellow', 'ixion' ),
-					'slug' => 'dark-yellow',
+					'slug'  => 'dark-yellow',
 					'color' => '#9c8012',
 					'color' => '#9c8012',
 				),
 				),
 			)
 			)
@@ -96,36 +98,50 @@ if ( ! function_exists( 'ixion_setup' ) ) :
 		add_image_size( 'ixion-avatar', 75, 75, true );
 		add_image_size( 'ixion-avatar', 75, 75, true );
 
 
 		// This theme uses wp_nav_menu() in three locations.
 		// This theme uses wp_nav_menu() in three locations.
-		register_nav_menus( array(
-			'menu-1' => esc_html__( 'Header', 'ixion' ),
-		) );
+		register_nav_menus(
+			array(
+				'menu-1' => esc_html__( 'Header', 'ixion' ),
+			)
+		);
 
 
 		/**
 		/**
 		 * Add support for core custom logo.
 		 * Add support for core custom logo.
 		 */
 		 */
-		add_theme_support( 'custom-logo', array(
-			'height'      => 100,
-			'width'       => 500,
-			'flex-width'  => true,
-			'flex-height' => true,
-		) );
+		add_theme_support(
+			'custom-logo',
+			array(
+				'height'      => 100,
+				'width'       => 500,
+				'flex-width'  => true,
+				'flex-height' => true,
+			)
+		);
 
 
 		/*
 		/*
 		 * Switch default core markup for search form, comment form, and comments
 		 * Switch default core markup for search form, comment form, and comments
 		 * to output valid HTML5.
 		 * to output valid HTML5.
 		 */
 		 */
-		add_theme_support( 'html5', array(
-			'search-form',
-			'comment-form',
-			'comment-list',
-			'gallery',
-			'caption',
-		) );
+		add_theme_support(
+			'html5',
+			array(
+				'search-form',
+				'comment-form',
+				'comment-list',
+				'gallery',
+				'caption',
+			)
+		);
 
 
 		// Set up the WordPress core custom background feature.
 		// Set up the WordPress core custom background feature.
-		add_theme_support( 'custom-background', apply_filters( 'ixion_custom_background_args', array(
-			'default-color' => 'ffffff',
-		) ) );
+		add_theme_support(
+			'custom-background',
+			apply_filters(
+				'ixion_custom_background_args',
+				array(
+					'default-color' => 'ffffff',
+				)
+			)
+		);
 
 
 	}
 	}
 endif;
 endif;
@@ -175,55 +191,65 @@ function ixion_the_custom_logo() {
  * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
  * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
  */
  */
 function ixion_widgets_init() {
 function ixion_widgets_init() {
-	register_sidebar( array(
-		'name'          => esc_html__( 'Sidebar', 'ixion' ),
-		'id'            => 'sidebar-1',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 1', 'ixion' ),
-		'id'            => 'sidebar-2',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 2', 'ixion' ),
-		'id'            => 'sidebar-3',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 3', 'ixion' ),
-		'id'            => 'sidebar-4',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 4', 'ixion' ),
-		'id'            => 'sidebar-5',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Sidebar', 'ixion' ),
+			'id'            => 'sidebar-1',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 1', 'ixion' ),
+			'id'            => 'sidebar-2',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 2', 'ixion' ),
+			'id'            => 'sidebar-3',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 3', 'ixion' ),
+			'id'            => 'sidebar-4',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 4', 'ixion' ),
+			'id'            => 'sidebar-5',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
 }
 }
 add_action( 'widgets_init', 'ixion_widgets_init' );
 add_action( 'widgets_init', 'ixion_widgets_init' );
 
 
@@ -241,7 +267,7 @@ function ixion_fonts_url_archivo() {
 
 
 	if ( 'off' !== $archivo ) {
 	if ( 'off' !== $archivo ) {
 
 
-		$font_families = array();
+		$font_families   = array();
 		$font_families[] = 'Archivo Narrow:400,400i,700,700i';
 		$font_families[] = 'Archivo Narrow:400,400i,700,700i';
 
 
 		$query_args = array(
 		$query_args = array(
@@ -269,7 +295,7 @@ function ixion_fonts_url_cooper() {
 	$cooper = esc_html_x( 'on', 'Cooper Hewitt font: on or off', 'ixion' );
 	$cooper = esc_html_x( 'on', 'Cooper Hewitt font: on or off', 'ixion' );
 
 
 	if ( 'off' !== $cooper ) {
 	if ( 'off' !== $cooper ) {
-		$fonts_url = get_template_directory_uri() . "/assets/fonts/cooperhewitt.css";
+		$fonts_url = get_template_directory_uri() . '/assets/fonts/cooperhewitt.css';
 	}
 	}
 
 
 	return $fonts_url;
 	return $fonts_url;
@@ -308,7 +334,7 @@ add_action( 'wp_enqueue_scripts', 'ixion_scripts' );
  * Gutenberg Editor Styles
  * Gutenberg Editor Styles
  */
  */
 function ixion_editor_styles() {
 function ixion_editor_styles() {
-	wp_enqueue_style( 'ixion-editor-block-style', get_template_directory_uri() . '/editor-blocks.css');
+	wp_enqueue_style( 'ixion-editor-block-style', get_template_directory_uri() . '/editor-blocks.css' );
 	wp_enqueue_style( 'ixion-fonts-archivo', ixion_fonts_url_archivo(), array(), null );
 	wp_enqueue_style( 'ixion-fonts-archivo', ixion_fonts_url_archivo(), array(), null );
 	wp_enqueue_style( 'ixion-fonts-cooper', ixion_fonts_url_cooper(), array(), null );
 	wp_enqueue_style( 'ixion-fonts-cooper', ixion_fonts_url_cooper(), array(), null );
 }
 }
@@ -320,11 +346,12 @@ add_action( 'enqueue_block_editor_assets', 'ixion_editor_styles' );
  */
  */
 if ( ! function_exists( 'ixion_excerpt_more' ) ) :
 if ( ! function_exists( 'ixion_excerpt_more' ) ) :
 	function ixion_excerpt_more( $more ) {
 	function ixion_excerpt_more( $more ) {
-		$link = sprintf( '<a href="%1$s" class="more-link">%2$s</a>',
+		$link = sprintf(
+			'<a href="%1$s" class="more-link">%2$s</a>',
 			esc_url( get_permalink( get_the_ID() ) ),
 			esc_url( get_permalink( get_the_ID() ) ),
 			/* translators: %s: Name of current post */
 			/* translators: %s: Name of current post */
 			sprintf( esc_html__( 'Continue reading %s', 'ixion' ), '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span>' )
 			sprintf( esc_html__( 'Continue reading %s', 'ixion' ), '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span>' )
-			);
+		);
 		return ' &hellip; ' . $link;
 		return ' &hellip; ' . $link;
 	}
 	}
 	add_filter( 'excerpt_more', 'ixion_excerpt_more' );
 	add_filter( 'excerpt_more', 'ixion_excerpt_more' );

+ 225 - 196
karuna/functions.php

@@ -8,131 +8,145 @@
  */
  */
 
 
 if ( ! function_exists( 'karuna_setup' ) ) :
 if ( ! function_exists( 'karuna_setup' ) ) :
-/**
- * Sets up theme defaults and registers support for various WordPress features.
- *
- * Note that this function is hooked into the aftercomponentsetup_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 karuna_setup() {
-	/*
-	 * Make theme available for translation.
-	 * Translations can be filed in the /languages/ directory.
-	 * If you're building a theme based on components, use a find and replace
-	 * to change 'karuna' to the name of your theme in all the template files.
-	 */
-	load_theme_textdomain( 'karuna', get_template_directory() . '/languages' );
-
-	// Add default posts and comments RSS feed links to head.
-	add_theme_support( 'automatic-feed-links' );
-
-	/*
-	 * Let WordPress manage the document title.
-	 * By adding theme support, we declare that this theme does not use a
-	 * hard-coded <title> tag in the document head, and expect WordPress to
-	 * provide it for us.
-	 */
-	add_theme_support( 'title-tag' );
-
-	// Add support for responsive embeds.
-	add_theme_support( 'responsive-embeds' );
 
 
 	/**
 	/**
-	 * Gutenberg wide and full images support
+	 * Sets up theme defaults and registers support for various WordPress features.
+	 *
+	 * Note that this function is hooked into the aftercomponentsetup_theme hook, which
+	 * runs before the init hook. The init hook is too late for some features, such
+	 * as indicating support for post thumbnails.
 	 */
 	 */
-	add_theme_support( 'align-wide' );
-
-	// Add custom colors to Gutenberg
-	add_theme_support(
-		'editor-color-palette', array(
-			array(
-				'name'  => esc_html__( 'Black', 'karuna' ),
-				'slug' => 'black',
-				'color' => '#333333',
-			),
-			array(
-				'name'  => esc_html__( 'Medium Gray', 'karuna' ),
-				'slug' => 'medium-gray',
-				'color' => '#999999',
-			),
-			array(
-				'name'  => esc_html__( 'Light Gray', 'karuna' ),
-				'slug' => 'light-gray',
-				'color' => '#dddddd',
-			),
-			array(
-				'name'  => esc_html__( 'White', 'karuna' ),
-				'slug' => 'white',
-				'color' => '#ffffff',
-			),
-			array(
-				'name'  => esc_html__( 'Purple', 'karuna' ),
-				'slug' => 'purple',
-				'color' => '#6636cc',
-			),
-			array(
-				'name'  => esc_html__( 'Dark Purple', 'karuna' ),
-				'slug' => 'dark-purple',
-				'color' => '#471e9e',
-			),
-			array(
-				'name'  => esc_html__( 'Green', 'karuna' ),
-				'slug' => 'green',
-				'color' => '#85cc36',
-			),
+	function karuna_setup() {
+		/*
+		 * Make theme available for translation.
+		 * Translations can be filed in the /languages/ directory.
+		 * If you're building a theme based on components, use a find and replace
+		 * to change 'karuna' to the name of your theme in all the template files.
+		 */
+		load_theme_textdomain( 'karuna', get_template_directory() . '/languages' );
+
+		// Add default posts and comments RSS feed links to head.
+		add_theme_support( 'automatic-feed-links' );
+
+		/*
+		 * Let WordPress manage the document title.
+		 * By adding theme support, we declare that this theme does not use a
+		 * hard-coded <title> tag in the document head, and expect WordPress to
+		 * provide it for us.
+		 */
+		add_theme_support( 'title-tag' );
+
+		// Add support for responsive embeds.
+		add_theme_support( 'responsive-embeds' );
+
+		/**
+		 * Gutenberg wide and full images support
+		 */
+		add_theme_support( 'align-wide' );
+
+		// Add custom colors to Gutenberg
+		add_theme_support(
+			'editor-color-palette',
 			array(
 			array(
-				'name'  => esc_html__( 'Dark Green', 'karuna' ),
-				'slug' => 'dark-green',
-				'color' => '#609d1b',
-			),
-		)
-	);
+				array(
+					'name'  => esc_html__( 'Black', 'karuna' ),
+					'slug'  => 'black',
+					'color' => '#333333',
+				),
+				array(
+					'name'  => esc_html__( 'Medium Gray', 'karuna' ),
+					'slug'  => 'medium-gray',
+					'color' => '#999999',
+				),
+				array(
+					'name'  => esc_html__( 'Light Gray', 'karuna' ),
+					'slug'  => 'light-gray',
+					'color' => '#dddddd',
+				),
+				array(
+					'name'  => esc_html__( 'White', 'karuna' ),
+					'slug'  => 'white',
+					'color' => '#ffffff',
+				),
+				array(
+					'name'  => esc_html__( 'Purple', 'karuna' ),
+					'slug'  => 'purple',
+					'color' => '#6636cc',
+				),
+				array(
+					'name'  => esc_html__( 'Dark Purple', 'karuna' ),
+					'slug'  => 'dark-purple',
+					'color' => '#471e9e',
+				),
+				array(
+					'name'  => esc_html__( 'Green', 'karuna' ),
+					'slug'  => 'green',
+					'color' => '#85cc36',
+				),
+				array(
+					'name'  => esc_html__( 'Dark Green', 'karuna' ),
+					'slug'  => 'dark-green',
+					'color' => '#609d1b',
+				),
+			)
+		);
 
 
-	/*
-	 * 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' );
+		/*
+		 * 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' );
 
 
-	add_image_size( 'karuna-featured-image', 685, 9999 );
-	add_image_size( 'karuna-hero', 2000, 9999 );
-	add_image_size( 'karuna-grid', 342, 228, true );
-	add_image_size( 'karuna-thumbnail-avatar', 100, 100, true );
+		add_image_size( 'karuna-featured-image', 685, 9999 );
+		add_image_size( 'karuna-hero', 2000, 9999 );
+		add_image_size( 'karuna-grid', 342, 228, true );
+		add_image_size( 'karuna-thumbnail-avatar', 100, 100, true );
 
 
-	// This theme uses wp_nav_menu() in one location.
-	register_nav_menus( array(
-		'menu-1' => esc_html__( 'Header', 'karuna' ),
-	) );
+		// This theme uses wp_nav_menu() in one location.
+		register_nav_menus(
+			array(
+				'menu-1' => esc_html__( 'Header', 'karuna' ),
+			)
+		);
 
 
-	/*
-	 * 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 custom logos
-	add_theme_support( 'custom-logo',
-		array(
-			'width'       => 1000,
-			'height'      => 200,
-			'flex-width'  => true,
-			'flex-height' => true,
-		)
-	);
+		/*
+		 * 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',
+			)
+		);
 
 
-	// Set up the WordPress core custom background feature.
-	add_theme_support( 'custom-background', apply_filters( 'karuna_custom_background_args', array(
-		'default-color' => 'ffffff',
-	) ) );
-}
+		// Add theme support for custom logos
+		add_theme_support(
+			'custom-logo',
+			array(
+				'width'       => 1000,
+				'height'      => 200,
+				'flex-width'  => true,
+				'flex-height' => true,
+			)
+		);
+
+		// Set up the WordPress core custom background feature.
+		add_theme_support(
+			'custom-background',
+			apply_filters(
+				'karuna_custom_background_args',
+				array(
+					'default-color' => 'ffffff',
+				)
+			)
+		);
+	}
 endif;
 endif;
 add_action( 'after_setup_theme', 'karuna_setup' );
 add_action( 'after_setup_theme', 'karuna_setup' );
 
 
@@ -166,14 +180,14 @@ add_action( 'after_setup_theme', 'karuna_content_width', 0 );
 
 
 if ( ! function_exists( 'karuna_adjusted_content_width' ) ) :
 if ( ! function_exists( 'karuna_adjusted_content_width' ) ) :
 
 
-function karuna_adjusted_content_width() {
-	global $content_width;
+	function karuna_adjusted_content_width() {
+		global $content_width;
 
 
-	if ( is_page_template( 'templates/full-width-page.php' ) || is_page_template( 'front-page.php' ) || is_active_sidebar( 'sidebar-5' ) || is_active_sidebar( 'sidebar-4' ) ) {
-		$content_width = 1040; //pixels
+		if ( is_page_template( 'templates/full-width-page.php' ) || is_page_template( 'front-page.php' ) || is_active_sidebar( 'sidebar-5' ) || is_active_sidebar( 'sidebar-4' ) ) {
+			$content_width = 1040; //pixels
+		}
 	}
 	}
-}
-add_action( 'template_redirect', 'karuna_adjusted_content_width' );
+	add_action( 'template_redirect', 'karuna_adjusted_content_width' );
 
 
 endif; // if ! function_exists( 'karuna_adjusted_content_width' )
 endif; // if ! function_exists( 'karuna_adjusted_content_width' )
 
 
@@ -183,75 +197,89 @@ endif; // if ! function_exists( 'karuna_adjusted_content_width' )
  * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
  * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
  */
  */
 function karuna_widgets_init() {
 function karuna_widgets_init() {
-	register_sidebar( array(
-		'name'          => esc_html__( 'Sidebar', 'karuna' ),
-		'id'            => 'sidebar-1',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Full-Width Header', 'karuna' ),
-		'id'            => 'sidebar-4',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Full-Width Footer', 'karuna' ),
-		'id'            => 'sidebar-5',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 1', 'karuna' ),
-		'id'            => 'sidebar-2',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 2', 'karuna' ),
-		'id'            => 'sidebar-3',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 3', 'karuna' ),
-		'id'            => 'sidebar-6',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 4', 'karuna' ),
-		'id'            => 'sidebar-7',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Sidebar', 'karuna' ),
+			'id'            => 'sidebar-1',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Full-Width Header', 'karuna' ),
+			'id'            => 'sidebar-4',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Full-Width Footer', 'karuna' ),
+			'id'            => 'sidebar-5',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 1', 'karuna' ),
+			'id'            => 'sidebar-2',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 2', 'karuna' ),
+			'id'            => 'sidebar-3',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 3', 'karuna' ),
+			'id'            => 'sidebar-6',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 4', 'karuna' ),
+			'id'            => 'sidebar-7',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
 }
 }
 add_action( 'widgets_init', 'karuna_widgets_init' );
 add_action( 'widgets_init', 'karuna_widgets_init' );
 
 
@@ -259,16 +287,16 @@ add_action( 'widgets_init', 'karuna_widgets_init' );
  * Register Google Fonts
  * Register Google Fonts
  */
  */
 function karuna_fonts_url() {
 function karuna_fonts_url() {
-    $fonts_url = '';
+	$fonts_url = '';
 
 
-    /* Translators: If there are characters in your language that are not
+	/* Translators: If there are characters in your language that are not
 	 * supported by Karla, translate this to 'off'. Do not translate
 	 * supported by Karla, translate this to 'off'. Do not translate
 	 * into your own language.
 	 * into your own language.
 	 */
 	 */
 	$karla = esc_html_x( 'on', 'Karla font: on or off', 'karuna' );
 	$karla = esc_html_x( 'on', 'Karla font: on or off', 'karuna' );
 
 
 	if ( 'off' !== $karla ) {
 	if ( 'off' !== $karla ) {
-		$font_families = array();
+		$font_families   = array();
 		$font_families[] = 'Karla:400,400italic,700,700italic';
 		$font_families[] = 'Karla:400,400italic,700,700italic';
 
 
 		$query_args = array(
 		$query_args = array(
@@ -323,11 +351,12 @@ add_action( 'enqueue_block_editor_assets', 'karuna_editor_styles' );
  */
  */
 if ( ! function_exists( 'karuna_excerpt_more' ) ) :
 if ( ! function_exists( 'karuna_excerpt_more' ) ) :
 	function karuna_excerpt_more( $more ) {
 	function karuna_excerpt_more( $more ) {
-		$link = sprintf( '<a href="%1$s" class="more-link">%2$s</a>',
+		$link = sprintf(
+			'<a href="%1$s" class="more-link">%2$s</a>',
 			esc_url( get_permalink( get_the_ID() ) ),
 			esc_url( get_permalink( get_the_ID() ) ),
 			/* translators: %s: Name of current post */
 			/* translators: %s: Name of current post */
 			sprintf( esc_html__( 'Continue reading %s', 'karuna' ), '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span>' )
 			sprintf( esc_html__( 'Continue reading %s', 'karuna' ), '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span>' )
-			);
+		);
 		return ' &hellip; ' . $link;
 		return ' &hellip; ' . $link;
 	}
 	}
 	add_filter( 'excerpt_more', 'karuna_excerpt_more' );
 	add_filter( 'excerpt_more', 'karuna_excerpt_more' );

+ 0 - 1
leven/functions.php

@@ -18,7 +18,6 @@ if ( ! function_exists( 'leven_setup' ) ) :
 	 * as indicating support for post thumbnails.
 	 * as indicating support for post thumbnails.
 	 */
 	 */
 	function leven_setup() {
 	function leven_setup() {
-
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		add_editor_style( 'style-editor.css' );
 		add_editor_style( 'style-editor.css' );
 
 

+ 168 - 137
libre-2/functions.php

@@ -6,82 +6,97 @@
  */
  */
 
 
 if ( ! function_exists( 'libre_2_setup' ) ) :
 if ( ! function_exists( 'libre_2_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 libre_2_setup() {
-	/*
-	 * Make theme available for translation.
-	 * Translations can be filed in the /languages/ directory.
+	/**
+	 * 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.
 	 */
 	 */
-	load_theme_textdomain( 'libre-2', get_template_directory() . '/languages' );
+	function libre_2_setup() {
+
+		/*
+		 * Make theme available for translation.
+		 * Translations can be filed in the /languages/ directory.
+		 */
+		load_theme_textdomain( 'libre-2', get_template_directory() . '/languages' );
+
+		// Add default posts and comments RSS feed links to head.
+		add_theme_support( 'automatic-feed-links' );
+
+		/*
+		 * Let WordPress manage the document title.
+		 * By adding theme support, we declare that this theme does not use a
+		 * hard-coded <title> tag in the document head, and expect WordPress to
+		 * provide it for us.
+		 */
+		add_theme_support( 'title-tag' );
+
+		/* Add support for editor styles */
+		add_editor_style( array( 'editor-style.css', libre_2_fonts_url() ) );
+
+		// This theme uses wp_nav_menu() in one location.
+		register_nav_menus(
+			array(
+				'menu-1' => esc_html__( 'Header', 'libre-2' ),
+			)
+		);
 
 
-	// Add default posts and comments RSS feed links to head.
-	add_theme_support( 'automatic-feed-links' );
+		/*
+		 * Add support for Featured Images
+		 */
+		add_theme_support( 'post-thumbnails' );
+		add_image_size( 'libre-2-post-thumbnail', '1088', '9999' );
+
+		/*
+		 * Add support for core Custom Logos
+		 */
+		add_theme_support(
+			'custom-logo',
+			array(
+				'height'     => 300,
+				'width'      => 300,
+				'flex-width' => true,
+			)
+		);
 
 
-	/*
-	 * Let WordPress manage the document title.
-	 * By adding theme support, we declare that this theme does not use a
-	 * hard-coded <title> tag in the document head, and expect WordPress to
-	 * provide it for us.
-	 */
-	add_theme_support( 'title-tag' );
+		// Add theme support for selective refresh for widgets.
+		add_theme_support( 'customize-selective-refresh-widgets' );
+
+		/*
+		 * Switch default core markup for search form, comment form, and comments
+		 * to output valid HTML5.
+		 */
+		add_theme_support(
+			'html5',
+			array(
+				'search-form',
+				'comment-form',
+				'gallery',
+				'caption',
+			)
+		);
 
 
-	/* Add support for editor styles */
-	add_editor_style( array( 'editor-style.css', libre_2_fonts_url() ) );
+		// Set up the WordPress core custom background feature.
+		add_theme_support(
+			'custom-background',
+			apply_filters(
+				'libre_2_custom_background_args',
+				array(
+					'default-color' => 'ffffff',
+				)
+			)
+		);
 
 
-	// This theme uses wp_nav_menu() in one location.
-	register_nav_menus( array(
-		'menu-1' => esc_html__( 'Header', 'libre-2' ),
-	) );
+		// Load regular editor styles into the new block-based editor.
+		add_theme_support( 'editor-styles' );
 
 
-	/*
-	 * Add support for Featured Images
-	 */
-	add_theme_support( 'post-thumbnails' );
-	add_image_size( 'libre-2-post-thumbnail', '1088', '9999' );
+		// Add support for responsive embeds.
+		add_theme_support( 'responsive-embeds' );
 
 
-	/*
-	 * Add support for core Custom Logos
-	 */
-	add_theme_support( 'custom-logo', array(
-		'height'      => 300,
-		'width'       => 300,
-		'flex-width' => true,
-	) );
-
-	// Add theme support for selective refresh for widgets.
-	add_theme_support( 'customize-selective-refresh-widgets' );
-
-	/*
-	 * Switch default core markup for search form, comment form, and comments
-	 * to output valid HTML5.
-	 */
-	add_theme_support( 'html5', array(
-		'search-form',
-		'comment-form',
-		'gallery',
-		'caption',
-	) );
-
-	// Set up the WordPress core custom background feature.
-	add_theme_support( 'custom-background', apply_filters( 'libre_2_custom_background_args', array(
-		'default-color' => 'ffffff',
-	) ) );
-
-	// Load regular editor styles into the new block-based editor.
-	add_theme_support( 'editor-styles' );
-
-	// Add support for responsive embeds.
-	add_theme_support( 'responsive-embeds' );
-
-	// Add support for full and wide align images.
-	add_theme_support( 'align-wide' );
-}
+		// Add support for full and wide align images.
+		add_theme_support( 'align-wide' );
+	}
 endif; // libre_2_setup
 endif; // libre_2_setup
 add_action( 'after_setup_theme', 'libre_2_setup' );
 add_action( 'after_setup_theme', 'libre_2_setup' );
 
 
@@ -103,14 +118,14 @@ add_action( 'after_setup_theme', 'libre_2_content_width', 0 );
 
 
 if ( ! function_exists( 'libre_2_content_width' ) ) :
 if ( ! function_exists( 'libre_2_content_width' ) ) :
 
 
-function libre_2_content_width() {
-     global $content_width;
+	function libre_2_content_width() {
+		 global $content_width;
 
 
-     if ( is_page_template( 'templates/full-width-page.php' ) ) {
-          $content_width = 1088; //pixels
-     }
-}
-add_action( 'template_redirect', 'libre_2_content_width' );
+		if ( is_page_template( 'templates/full-width-page.php' ) ) {
+			$content_width = 1088; //pixels
+		}
+	}
+	add_action( 'template_redirect', 'libre_2_content_width' );
 
 
 endif; // if ! function_exists( 'libre_2_content_width' )
 endif; // if ! function_exists( 'libre_2_content_width' )
 
 
@@ -120,45 +135,53 @@ endif; // if ! function_exists( 'libre_2_content_width' )
  * @link http://codex.wordpress.org/Function_Reference/register_sidebar
  * @link http://codex.wordpress.org/Function_Reference/register_sidebar
  */
  */
 function libre_2_widgets_init() {
 function libre_2_widgets_init() {
-	register_sidebar( array(
-		'name'          => esc_html__( 'Sidebar', 'libre-2' ),
-		'id'            => 'sidebar-1',
-		'description'   => '',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 1', 'libre-2' ),
-		'id'            => 'sidebar-2',
-		'description'   => '',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 2', 'libre-2' ),
-		'id'            => 'sidebar-3',
-		'description'   => '',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 3', 'libre-2' ),
-		'id'            => 'sidebar-4',
-		'description'   => '',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Sidebar', 'libre-2' ),
+			'id'            => 'sidebar-1',
+			'description'   => '',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 1', 'libre-2' ),
+			'id'            => 'sidebar-2',
+			'description'   => '',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 2', 'libre-2' ),
+			'id'            => 'sidebar-3',
+			'description'   => '',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 3', 'libre-2' ),
+			'id'            => 'sidebar-4',
+			'description'   => '',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
 }
 }
 add_action( 'widgets_init', 'libre_2_widgets_init' );
 add_action( 'widgets_init', 'libre_2_widgets_init' );
 
 
@@ -166,16 +189,16 @@ add_action( 'widgets_init', 'libre_2_widgets_init' );
  * Register Google Fonts
  * Register Google Fonts
  */
  */
 function libre_2_fonts_url() {
 function libre_2_fonts_url() {
-    $fonts_url = '';
+	$fonts_url = '';
 
 
-    /* Translators: If there are characters in your language that are not
+	/* Translators: If there are characters in your language that are not
 	 * supported by Libre Baskerville, translate this to 'off'. Do not translate
 	 * supported by Libre Baskerville, translate this to 'off'. Do not translate
 	 * into your own language.
 	 * into your own language.
 	 */
 	 */
 	$libre = esc_html_x( 'on', 'Libre Baskerville font: on or off', 'libre-2' );
 	$libre = esc_html_x( 'on', 'Libre Baskerville font: on or off', 'libre-2' );
 
 
 	if ( 'off' !== $libre ) {
 	if ( 'off' !== $libre ) {
-		$font_families = array();
+		$font_families   = array();
 		$font_families[] = 'Libre Baskerville:400,400italic,700';
 		$font_families[] = 'Libre Baskerville:400,400italic,700';
 
 
 		$query_args = array(
 		$query_args = array(
@@ -266,19 +289,19 @@ add_filter( 'wp_list_categories', 'libre_2_cat_count_span' );
  */
  */
 
 
 function libre_2_archive_count_span( $links ) {
 function libre_2_archive_count_span( $links ) {
-  $links = str_replace( '</a>&nbsp;(', '</a><span class="post-count">(', $links );
-  $links = str_replace( ')', ')</span>', $links );
-  return $links;
+	$links = str_replace( '</a>&nbsp;(', '</a><span class="post-count">(', $links );
+	$links = str_replace( ')', ')</span>', $links );
+	return $links;
 }
 }
 add_filter( 'get_archives_link', 'libre_2_archive_count_span' );
 add_filter( 'get_archives_link', 'libre_2_archive_count_span' );
 
 
 if ( ! function_exists( 'libre_2_continue_reading_link' ) ) :
 if ( ! function_exists( 'libre_2_continue_reading_link' ) ) :
-/**
- * Returns an ellipsis and "Continue reading" plus off-screen title link for excerpts
- */
-function libre_2_continue_reading_link() {
-	return '&hellip; <a class="more-link" href="'. esc_url( get_permalink() ) . '">' . sprintf( wp_kses_post( __( 'Continue reading <span class="screen-reader-text">%1$s</span> <span class="meta-nav" aria-hidden="true">&rarr;</span>', 'libre-2' ) ), esc_attr( strip_tags( get_the_title() ) ) ) . '</a>';
-}
+	/**
+	 * Returns an ellipsis and "Continue reading" plus off-screen title link for excerpts
+	 */
+	function libre_2_continue_reading_link() {
+		return '&hellip; <a class="more-link" href="' . esc_url( get_permalink() ) . '">' . sprintf( wp_kses_post( __( 'Continue reading <span class="screen-reader-text">%1$s</span> <span class="meta-nav" aria-hidden="true">&rarr;</span>', 'libre-2' ) ), esc_attr( strip_tags( get_the_title() ) ) ) . '</a>';
+	}
 endif; // libre_2_continue_reading_link
 endif; // libre_2_continue_reading_link
 
 
 
 
@@ -313,13 +336,16 @@ add_filter( 'get_the_excerpt', 'libre_2_custom_excerpt_more' );
  * used in comments.php
  * used in comments.php
  */
  */
 function libre_2_comments( $comment, $args, $depth ) {
 function libre_2_comments( $comment, $args, $depth ) {
-?>
+	?>
 		<li id="comment-<?php comment_ID(); ?>" <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>>
 		<li id="comment-<?php comment_ID(); ?>" <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>>
 			<article id="div-comment-<?php comment_ID(); ?>" class="comment-body">
 			<article id="div-comment-<?php comment_ID(); ?>" class="comment-body">
 				<footer class="comment-meta">
 				<footer class="comment-meta">
 					<div class="comment-metadata">
 					<div class="comment-metadata">
 						<span class="comment-author vcard">
 						<span class="comment-author vcard">
-							<?php if ( 0 != $args['avatar_size'] ) echo get_avatar( $comment, $args['avatar_size'] ); ?>
+							<?php
+							if ( 0 != $args['avatar_size'] ) {
+								echo get_avatar( $comment, $args['avatar_size'] );}
+							?>
 
 
 							<?php printf( '<b class="fn">%s</b>', get_comment_author_link() ); ?>
 							<?php printf( '<b class="fn">%s</b>', get_comment_author_link() ); ?>
 						</span>
 						</span>
@@ -329,13 +355,18 @@ function libre_2_comments( $comment, $args, $depth ) {
 							</time>
 							</time>
 						</a>
 						</a>
 						<?php
 						<?php
-						comment_reply_link( array_merge( $args, array(
-							'add_below' => 'div-comment',
-							'depth'     => $depth,
-							'max_depth' => $args['max_depth'],
-							'before'    => '<span class="reply">',
-							'after'     => '</span>'
-						) ) );
+						comment_reply_link(
+							array_merge(
+								$args,
+								array(
+									'add_below' => 'div-comment',
+									'depth'     => $depth,
+									'max_depth' => $args['max_depth'],
+									'before'    => '<span class="reply">',
+									'after'     => '</span>',
+								)
+							)
+						);
 						?>
 						?>
 						<?php edit_comment_link( esc_html__( 'Edit', 'libre-2' ), '<span class="edit-link">', '</span>' ); ?>
 						<?php edit_comment_link( esc_html__( 'Edit', 'libre-2' ), '<span class="edit-link">', '</span>' ); ?>
 
 
@@ -351,7 +382,7 @@ function libre_2_comments( $comment, $args, $depth ) {
 				</div><!-- .comment-content -->
 				</div><!-- .comment-content -->
 
 
 			</article><!-- .comment-body -->
 			</article><!-- .comment-body -->
-<?php
+	<?php
 }
 }
 
 
 /**
 /**

+ 109 - 78
libretto/functions.php

@@ -21,14 +21,13 @@ if ( ! function_exists( 'libretto_setup' ) ) :
 	 * support post thumbnails.
 	 * support post thumbnails.
 	 */
 	 */
 	function libretto_setup() {
 	function libretto_setup() {
-
 		/**
 		/**
 		 * Make theme available for translation
 		 * Make theme available for translation
 		 * Translations can be filed in the /languages/ directory
 		 * Translations can be filed in the /languages/ directory
 		 * If you're building a theme based on Libretto, use a find and replace
 		 * If you're building a theme based on Libretto, use a find and replace
 		 * to change 'libretto' to the name of your theme in all the template files
 		 * to change 'libretto' to the name of your theme in all the template files
 		 */
 		 */
-		load_theme_textdomain( 'libretto', get_template_directory().'/languages' );
+		load_theme_textdomain( 'libretto', get_template_directory() . '/languages' );
 
 
 		/**
 		/**
 		 * Add default posts and comments RSS feed links to head
 		 * Add default posts and comments RSS feed links to head
@@ -53,42 +52,43 @@ if ( ! function_exists( 'libretto_setup' ) ) :
 		// Add support for responsive embeds.
 		// Add support for responsive embeds.
 		add_theme_support( 'responsive-embeds' );
 		add_theme_support( 'responsive-embeds' );
 
 
-	 	// Add custom colors to Gutenberg
+		// Add custom colors to Gutenberg
 		add_theme_support(
 		add_theme_support(
-			'editor-color-palette', array(
+			'editor-color-palette',
+			array(
 				array(
 				array(
 					'name'  => esc_html__( 'Black', 'libretto' ),
 					'name'  => esc_html__( 'Black', 'libretto' ),
-					'slug' => 'black',
+					'slug'  => 'black',
 					'color' => '#26231e',
 					'color' => '#26231e',
 				),
 				),
 				array(
 				array(
 					'name'  => esc_html__( 'Dark Gray', 'libretto' ),
 					'name'  => esc_html__( 'Dark Gray', 'libretto' ),
-					'slug' => 'dark-gray',
+					'slug'  => 'dark-gray',
 					'color' => '#787065',
 					'color' => '#787065',
 				),
 				),
 				array(
 				array(
 					'name'  => esc_html__( 'Medium Gray', 'libretto' ),
 					'name'  => esc_html__( 'Medium Gray', 'libretto' ),
-					'slug' => 'medium-gray',
+					'slug'  => 'medium-gray',
 					'color' => '#a09a92',
 					'color' => '#a09a92',
 				),
 				),
 				array(
 				array(
 					'name'  => esc_html__( 'Light Gray', 'libretto' ),
 					'name'  => esc_html__( 'Light Gray', 'libretto' ),
-					'slug' => 'light-gray',
+					'slug'  => 'light-gray',
 					'color' => '#d9d6d0',
 					'color' => '#d9d6d0',
 				),
 				),
 				array(
 				array(
 					'name'  => esc_html__( 'White', 'libretto' ),
 					'name'  => esc_html__( 'White', 'libretto' ),
-					'slug' => 'white',
+					'slug'  => 'white',
 					'color' => '#ffffff',
 					'color' => '#ffffff',
 				),
 				),
 				array(
 				array(
 					'name'  => esc_html__( 'Red', 'libretto' ),
 					'name'  => esc_html__( 'Red', 'libretto' ),
-					'slug' => 'red',
+					'slug'  => 'red',
 					'color' => '#932817',
 					'color' => '#932817',
 				),
 				),
 				array(
 				array(
 					'name'  => esc_html__( 'Dark Red', 'libretto' ),
 					'name'  => esc_html__( 'Dark Red', 'libretto' ),
-					'slug' => 'dark-red',
+					'slug'  => 'dark-red',
 					'color' => '#712012',
 					'color' => '#712012',
 				),
 				),
 			)
 			)
@@ -98,24 +98,40 @@ if ( ! function_exists( 'libretto_setup' ) ) :
 		 * This theme uses wp_nav_menu() in two locations:
 		 * This theme uses wp_nav_menu() in two locations:
 		 * one at the top of the page, and one for social media links in the footer
 		 * one at the top of the page, and one for social media links in the footer
 		 */
 		 */
-		register_nav_menus( array(
-			'primary' => __( 'Primary Menu', 'libretto' ),
-			'social'  => __( 'Social Media Menu', 'libretto' ),
-		) );
+		register_nav_menus(
+			array(
+				'primary' => __( 'Primary Menu', 'libretto' ),
+				'social'  => __( 'Social Media Menu', 'libretto' ),
+			)
+		);
 
 
 		/**
 		/**
 		 * Enable support for Post Formats
 		 * Enable support for Post Formats
 		 */
 		 */
-		add_theme_support( 'post-formats', array(
-			'aside', 'image', 'video', 'quote', 'link', 'audio', 'chat', 'gallery', 'status',
-		) );
+		add_theme_support(
+			'post-formats',
+			array(
+				'aside',
+				'image',
+				'video',
+				'quote',
+				'link',
+				'audio',
+				'chat',
+				'gallery',
+				'status',
+			)
+		);
 
 
 		/**
 		/**
 		 * Enable support for custom background
 		 * Enable support for custom background
 		 */
 		 */
-		add_theme_support( 'custom-background', array(
-			'default-color' => '#f2f1ed',
-		) );
+		add_theme_support(
+			'custom-background',
+			array(
+				'default-color' => '#f2f1ed',
+			)
+		);
 
 
 		/**
 		/**
 		 * Enable support for proper titles
 		 * Enable support for proper titles
@@ -131,9 +147,16 @@ if ( ! function_exists( 'libretto_setup' ) ) :
 		 * Switch default core markup for search form, comment form, and comments
 		 * Switch default core markup for search form, comment form, and comments
 		 * to output valid HTML5.
 		 * to output valid HTML5.
 		 */
 		 */
-		add_theme_support( 'html5', array(
-			'search-form', 'comment-form', 'comment-list', 'gallery', 'caption',
-		) );
+		add_theme_support(
+			'html5',
+			array(
+				'search-form',
+				'comment-form',
+				'comment-list',
+				'gallery',
+				'caption',
+			)
+		);
 
 
 	} // libretto_setup()
 	} // libretto_setup()
 endif;
 endif;
@@ -143,38 +166,46 @@ add_action( 'after_setup_theme', 'libretto_setup' );
  * Register widgetized area and update sidebar with default widgets
  * Register widgetized area and update sidebar with default widgets
  */
  */
 function libretto_widgets_init() {
 function libretto_widgets_init() {
-	register_sidebar( array(
-		'name'          => __( 'First Footer Sidebar', 'libretto' ),
-		'id'            => 'sidebar-1',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-	register_sidebar( array(
-		'name'          => __( 'Second Footer Sidebar', 'libretto' ),
-		'id'            => 'sidebar-2',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-	register_sidebar( array(
-		'name'          => __( 'Third Footer Sidebar', 'libretto' ),
-		'id'            => 'sidebar-3',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-	register_sidebar( array(
-		'name'          => __( 'Fourth Footer Sidebar', 'libretto' ),
-		'id'            => 'sidebar-4',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
+	register_sidebar(
+		array(
+			'name'          => __( 'First Footer Sidebar', 'libretto' ),
+			'id'            => 'sidebar-1',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+	register_sidebar(
+		array(
+			'name'          => __( 'Second Footer Sidebar', 'libretto' ),
+			'id'            => 'sidebar-2',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+	register_sidebar(
+		array(
+			'name'          => __( 'Third Footer Sidebar', 'libretto' ),
+			'id'            => 'sidebar-3',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+	register_sidebar(
+		array(
+			'name'          => __( 'Fourth Footer Sidebar', 'libretto' ),
+			'id'            => 'sidebar-4',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
 }
 }
 add_action( 'widgets_init', 'libretto_widgets_init' );
 add_action( 'widgets_init', 'libretto_widgets_init' );
 
 
@@ -247,19 +278,19 @@ function libretto_scripts() {
 
 
 	// General site stylesheet & JS
 	// General site stylesheet & JS
 	wp_enqueue_style( 'libretto-style', get_stylesheet_uri() );
 	wp_enqueue_style( 'libretto-style', get_stylesheet_uri() );
-	wp_enqueue_script( 'libretto-script', get_template_directory_uri().'/js/libretto.js', array( 'jquery' ), '20140331' );
+	wp_enqueue_script( 'libretto-script', get_template_directory_uri() . '/js/libretto.js', array( 'jquery' ), '20140331' );
 
 
 	// Gutenberg styles
 	// Gutenberg styles
 	wp_enqueue_style( 'libretto-blocks', get_template_directory_uri() . '/css/blocks.css' );
 	wp_enqueue_style( 'libretto-blocks', get_template_directory_uri() . '/css/blocks.css' );
 
 
 	// Fonts
 	// Fonts
 	wp_enqueue_style( 'libretto-fonts', libretto_fonts_url(), array(), null );
 	wp_enqueue_style( 'libretto-fonts', libretto_fonts_url(), array(), null );
-	wp_enqueue_style( 'libretto-custom-icons', get_template_directory_uri().'/icons/icons.css', array(), null );
+	wp_enqueue_style( 'libretto-custom-icons', get_template_directory_uri() . '/icons/icons.css', array(), null );
 
 
 	// Navigation
 	// Navigation
-	wp_enqueue_script( 'libretto-touche', get_template_directory_uri().'/js/touche.js', '20150604', true );
-	wp_enqueue_script( 'libretto-navigation', get_template_directory_uri().'/js/navigation.js', array( 'jquery' ), '20150115', true );
-	wp_enqueue_script( 'libretto-skip-link-focus-fix', get_template_directory_uri().'/js/skip-link-focus-fix.js', array(), '20130115', true );
+	wp_enqueue_script( 'libretto-touche', get_template_directory_uri() . '/js/touche.js', '20150604', true );
+	wp_enqueue_script( 'libretto-navigation', get_template_directory_uri() . '/js/navigation.js', array( 'jquery' ), '20150115', true );
+	wp_enqueue_script( 'libretto-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );
 
 
 	// Comments
 	// Comments
 	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
 	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
@@ -285,7 +316,7 @@ add_action( 'enqueue_block_editor_assets', 'libretto_editor_styles' );
 function libretto_get_active_sidebars() {
 function libretto_get_active_sidebars() {
 	// Loop through all possible sidebar areas to determine if they're active or not
 	// Loop through all possible sidebar areas to determine if they're active or not
 	$available_sidebars = array( 'sidebar-1', 'sidebar-2', 'sidebar-3', 'sidebar-4' );
 	$available_sidebars = array( 'sidebar-1', 'sidebar-2', 'sidebar-3', 'sidebar-4' );
-	$active_sidebars = array();
+	$active_sidebars    = array();
 
 
 	foreach ( $available_sidebars as $sidebar_name ) :
 	foreach ( $available_sidebars as $sidebar_name ) :
 		if ( is_active_sidebar( $sidebar_name ) ) {
 		if ( is_active_sidebar( $sidebar_name ) ) {
@@ -306,29 +337,29 @@ function libretto_get_active_sidebars() {
  * You can pass a variable to request a particular type of information. Default is URL.
  * You can pass a variable to request a particular type of information. Default is URL.
  */
  */
 function libretto_get_header_image( $request = '' ) {
 function libretto_get_header_image( $request = '' ) {
-  // If there's a featured image set for the post/page, use that
-  if ( libretto_has_post_thumbnail() && is_single() && libretto_jetpack_featured_image_display() ) :
-    $libretto_featured_image = libretto_get_attachment_image_src( get_the_ID(), get_post_thumbnail_id( get_the_ID() ), 'libretto-fullpage' );
-    $libretto_header_image = $libretto_featured_image;
-    $libretto_header_image_height = 1000;
+	// If there's a featured image set for the post/page, use that
+	if ( libretto_has_post_thumbnail() && is_single() && libretto_jetpack_featured_image_display() ) :
+		$libretto_featured_image      = libretto_get_attachment_image_src( get_the_ID(), get_post_thumbnail_id( get_the_ID() ), 'libretto-fullpage' );
+		$libretto_header_image        = $libretto_featured_image;
+		$libretto_header_image_height = 1000;
   elseif ( has_post_thumbnail() && is_singular() && libretto_jetpack_featured_image_display() ) :
   elseif ( has_post_thumbnail() && is_singular() && libretto_jetpack_featured_image_display() ) :
-    $libretto_featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'libretto-fullpage' );
-    $libretto_header_image = $libretto_featured_image[0];
-    $libretto_header_image_height = $libretto_featured_image[2];
-  // Otherwise, use the header image
+	  $libretto_featured_image      = wp_get_attachment_image_src( get_post_thumbnail_id(), 'libretto-fullpage' );
+	  $libretto_header_image        = $libretto_featured_image[0];
+	  $libretto_header_image_height = $libretto_featured_image[2];
+	  // Otherwise, use the header image
   elseif ( get_header_image() ) :
   elseif ( get_header_image() ) :
-    $libretto_header_image = get_header_image();
-    $libretto_header_image_height = get_custom_header()->height;
+	  $libretto_header_image        = get_header_image();
+	  $libretto_header_image_height = get_custom_header()->height;
   endif;
   endif;
 
 
   // We'll return different information depending on the parameter passed
   // We'll return different information depending on the parameter passed
   // This allows us to use the same function for two things
   // This allows us to use the same function for two things
   if ( isset( $libretto_header_image ) ) :
   if ( isset( $libretto_header_image ) ) :
-    if ( 'height' === $request ) {
-  		return $libretto_header_image_height;
-    }	else {
-  		return $libretto_header_image;
-  	}
+	  if ( 'height' === $request ) {
+		  return $libretto_header_image_height;
+	  } else {
+		  return $libretto_header_image;
+	  }
   endif;
   endif;
 }
 }
 
 

+ 142 - 118
lodestar/functions.php

@@ -8,93 +8,108 @@
  */
  */
 
 
 if ( ! function_exists( 'lodestar_setup' ) ) :
 if ( ! function_exists( 'lodestar_setup' ) ) :
-/**
- * Sets up theme defaults and registers support for various WordPress features.
- *
- * Note that this function is hooked into the aftercomponentsetup_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 lodestar_setup() {
-	/*
-	 * Make theme available for translation.
-	 * Translations can be filed in the /languages/ directory.
-	 * If you're building a theme based on components, use a find and replace
-	 * to change 'lodestar' to the name of your theme in all the template files.
+	/**
+	 * Sets up theme defaults and registers support for various WordPress features.
+	 *
+	 * Note that this function is hooked into the aftercomponentsetup_theme hook, which
+	 * runs before the init hook. The init hook is too late for some features, such
+	 * as indicating support for post thumbnails.
 	 */
 	 */
-	load_theme_textdomain( 'lodestar', get_template_directory() . '/languages' );
+	function lodestar_setup() {
 
 
-	// Add default posts and comments RSS feed links to head.
-	add_theme_support( 'automatic-feed-links' );
+		/*
+		 * Make theme available for translation.
+		 * Translations can be filed in the /languages/ directory.
+		 * If you're building a theme based on components, use a find and replace
+		 * to change 'lodestar' to the name of your theme in all the template files.
+		 */
+		load_theme_textdomain( 'lodestar', get_template_directory() . '/languages' );
 
 
-	/*
-	 * Let WordPress manage the document title.
-	 * By adding theme support, we declare that this theme does not use a
-	 * hard-coded <title> tag in the document head, and expect WordPress to
-	 * provide it for us.
-	 */
-	add_theme_support( 'title-tag' );
+		// 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 https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
-	 */
-	add_theme_support( 'post-thumbnails' );
+		/*
+		 * Let WordPress manage the document title.
+		 * By adding theme support, we declare that this theme does not use a
+		 * hard-coded <title> tag in the document head, and expect WordPress to
+		 * provide it for us.
+		 */
+		add_theme_support( 'title-tag' );
 
 
-	add_image_size( 'lodestar-featured-image', 2000, 1200, true );
+		/*
+		 * 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' );
 
 
-	add_image_size( 'lodestar-featured-archive-image', 700, 9999 );
+		add_image_size( 'lodestar-featured-image', 2000, 1200, true );
 
 
-	add_image_size( 'lodestar-portfolio-image', 2000, 9999 );
+		add_image_size( 'lodestar-featured-archive-image', 700, 9999 );
 
 
-	add_image_size( 'lodestar-portfolio-archive-image', 900, 600, true );
+		add_image_size( 'lodestar-portfolio-image', 2000, 9999 );
 
 
-	add_image_size( 'lodestar-thumbnail-avatar', 100, 100, true );
+		add_image_size( 'lodestar-portfolio-archive-image', 900, 600, true );
 
 
-	add_image_size( 'lodestar-logo', 2400, 400 );
+		add_image_size( 'lodestar-thumbnail-avatar', 100, 100, true );
 
 
-	// This theme uses wp_nav_menu() in one location.
-	register_nav_menus( array(
-		'top' => esc_html__( 'Top', 'lodestar' ),
-	) );
+		add_image_size( 'lodestar-logo', 2400, 400 );
 
 
-	/*
-	 * 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',
-	) );
-
-	// Set up the WordPress core custom background feature.
-	add_theme_support( 'custom-background', apply_filters( 'lodestar_custom_background_args', array(
-		'default-color' => 'ffffff',
-		'default-image' => '',
-	) ) );
-
-	// Add support to selectively refresh widgets in Customizer
-	add_theme_support( 'customize_selective_refresh_widgets' );
-
-	// Add theme support for Custom Logo.
-	add_theme_support( 'custom-logo', array(
-		'width'       => 2400,
-		'height'      => 400,
-		'flex-width'  => true,
-		'flex-height' => true,
-		'header-text' => array( 'site-title', 'site-description' ),
-	) );
-
-	// Add support for responsive embeds.
-	add_theme_support( 'responsive-embeds' );
-
-	// Add support for full and wide align images.
-	add_theme_support( 'align-wide' );
-}
+		// This theme uses wp_nav_menu() in one location.
+		register_nav_menus(
+			array(
+				'top' => esc_html__( 'Top', 'lodestar' ),
+			)
+		);
+
+		/*
+		 * 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',
+			)
+		);
+
+		// Set up the WordPress core custom background feature.
+		add_theme_support(
+			'custom-background',
+			apply_filters(
+				'lodestar_custom_background_args',
+				array(
+					'default-color' => 'ffffff',
+					'default-image' => '',
+				)
+			)
+		);
+
+		// Add support to selectively refresh widgets in Customizer
+		add_theme_support( 'customize_selective_refresh_widgets' );
+
+		// Add theme support for Custom Logo.
+		add_theme_support(
+			'custom-logo',
+			array(
+				'width'       => 2400,
+				'height'      => 400,
+				'flex-width'  => true,
+				'flex-height' => true,
+				'header-text' => array( 'site-title', 'site-description' ),
+			)
+		);
+
+		// Add support for responsive embeds.
+		add_theme_support( 'responsive-embeds' );
+
+		// Add support for full and wide align images.
+		add_theme_support( 'align-wide' );
+	}
 endif;
 endif;
 add_action( 'after_setup_theme', 'lodestar_setup' );
 add_action( 'after_setup_theme', 'lodestar_setup' );
 
 
@@ -115,14 +130,15 @@ add_action( 'after_setup_theme', 'lodestar_content_width', 0 );
  */
  */
 function lodestar_the_custom_logo() {
 function lodestar_the_custom_logo() {
 	if ( has_custom_logo() ) {
 	if ( has_custom_logo() ) {
-		$custom_logo_id = get_theme_mod( 'custom_logo' );
+		$custom_logo_id   = get_theme_mod( 'custom_logo' );
 		$custom_logo_attr = array(
 		$custom_logo_attr = array(
 			'class'    => 'site-logo',
 			'class'    => 'site-logo',
 			'itemprop' => 'logo',
 			'itemprop' => 'logo',
 		);
 		);
-		printf( '<a href="%1$s" class="site-logo-link" rel="home" itemprop="url">%2$s</a>',
+		printf(
+			'<a href="%1$s" class="site-logo-link" rel="home" itemprop="url">%2$s</a>',
 			esc_url( home_url( '/' ) ),
 			esc_url( home_url( '/' ) ),
-			wp_get_attachment_image( $custom_logo_id , 'lodestar-logo', false, $custom_logo_attr )
+			wp_get_attachment_image( $custom_logo_id, 'lodestar-logo', false, $custom_logo_attr )
 		);
 		);
 	}
 	}
 }
 }
@@ -173,45 +189,53 @@ function lodestar_fonts_url() {
  * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
  * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
  */
  */
 function lodestar_widgets_init() {
 function lodestar_widgets_init() {
-	register_sidebar( array(
-		'name'          => esc_html__( 'Sidebar', 'lodestar' ),
-		'id'            => 'sidebar-1',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 1', 'lodestar' ),
-		'id'            => 'sidebar-2',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 2', 'lodestar' ),
-		'id'            => 'sidebar-3',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 3', 'lodestar' ),
-		'id'            => 'sidebar-4',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Sidebar', 'lodestar' ),
+			'id'            => 'sidebar-1',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 1', 'lodestar' ),
+			'id'            => 'sidebar-2',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 2', 'lodestar' ),
+			'id'            => 'sidebar-3',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 3', 'lodestar' ),
+			'id'            => 'sidebar-4',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
 
 
 	// echo esc_attr( lodestar_widget_column_class( 'sidebar-1' ) );
 	// echo esc_attr( lodestar_widget_column_class( 'sidebar-1' ) );
 }
 }
@@ -240,7 +264,7 @@ add_filter( 'get_avatar', 'lodestar_get_avatar', 10, 5 );
 function lodestar_front_page_template( $template ) {
 function lodestar_front_page_template( $template ) {
 	return is_home() ? '' : $template;
 	return is_home() ? '' : $template;
 }
 }
-add_filter( 'frontpage_template',  'lodestar_front_page_template' );
+add_filter( 'frontpage_template', 'lodestar_front_page_template' );
 
 
 
 
 /**
 /**

+ 0 - 1
mayland/functions.php

@@ -18,7 +18,6 @@ if ( ! function_exists( 'mayland_setup' ) ) :
 	 * as indicating support for post thumbnails.
 	 * as indicating support for post thumbnails.
 	 */
 	 */
 	function mayland_setup() {
 	function mayland_setup() {
-
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		add_editor_style( 'style-editor.css' );
 		add_editor_style( 'style-editor.css' );
 
 

+ 0 - 1
maywood/functions.php

@@ -18,7 +18,6 @@ if ( ! function_exists( 'maywood_setup' ) ) :
 	 * as indicating support for post thumbnails.
 	 * as indicating support for post thumbnails.
 	 */
 	 */
 	function maywood_setup() {
 	function maywood_setup() {
-
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		add_editor_style( 'style-editor.css' );
 		add_editor_style( 'style-editor.css' );
 
 

+ 9 - 10
modern-business/functions.php

@@ -22,14 +22,14 @@ if ( ! function_exists( 'modern_business_setup' ) ) :
 		 * @link https://codex.wordpress.org/Theme_Logo
 		 * @link https://codex.wordpress.org/Theme_Logo
 		 */
 		 */
 		add_theme_support(
 		add_theme_support(
-				'custom-logo',
-				array(
-						'height'      => 128,
-						'width'       => 128,
-						'flex-width'  => true,
-						'flex-height' => false,
-						'header-text' => array( 'site-title' ),
-				)
+			'custom-logo',
+			array(
+				'height'      => 128,
+				'width'       => 128,
+				'flex-width'  => true,
+				'flex-height' => false,
+				'header-text' => array( 'site-title' ),
+			)
 		);
 		);
 
 
 		// Editor color palette.
 		// Editor color palette.
@@ -67,7 +67,6 @@ if ( ! function_exists( 'modern_business_setup' ) ) :
 endif; // modern_business_setup
 endif; // modern_business_setup
 add_action( 'after_setup_theme', 'modern_business_setup', 30 );
 add_action( 'after_setup_theme', 'modern_business_setup', 30 );
 
 
-
 function modern_business_fonts_url() {
 function modern_business_fonts_url() {
 	$fonts_url = '';
 	$fonts_url = '';
 	/* Translators: If there are characters in your language that are not
 	/* Translators: If there are characters in your language that are not
@@ -84,7 +83,7 @@ function modern_business_fonts_url() {
 			'family' => urlencode( implode( '|', $font_families ) ),
 			'family' => urlencode( implode( '|', $font_families ) ),
 			'subset' => urlencode( 'latin,latin-ext' ),
 			'subset' => urlencode( 'latin,latin-ext' ),
 		);
 		);
-		$fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
+		$fonts_url  = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
 	}
 	}
 	return esc_url_raw( $fonts_url );
 	return esc_url_raw( $fonts_url );
 }
 }

+ 0 - 1
morden/functions.php

@@ -30,7 +30,6 @@ if ( ! function_exists( 'morden_setup' ) ) :
 	 * as indicating support for post thumbnails.
 	 * as indicating support for post thumbnails.
 	 */
 	 */
 	function morden_setup() {
 	function morden_setup() {
-
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		add_editor_style( 'style-editor.css' );
 		add_editor_style( 'style-editor.css' );
 
 

+ 155 - 129
penscratch-2/functions.php

@@ -6,109 +6,127 @@
  */
  */
 
 
 if ( ! function_exists( 'penscratch_2_setup' ) ) :
 if ( ! function_exists( 'penscratch_2_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 penscratch_2_setup() {
-
-	/*
-	 * Make theme available for translation.
-	 * Translations can be filed in the /languages/ directory.
-	 * If you're building a theme based on Penscratch 2, use a find and replace
-	 * to change 'penscratch-2' to the name of your theme in all the template files
+	/**
+	 * 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.
 	 */
 	 */
-	load_theme_textdomain( 'penscratch-2', get_template_directory() . '/languages' );
+	function penscratch_2_setup() {
+		/*
+		 * Make theme available for translation.
+		 * Translations can be filed in the /languages/ directory.
+		 * If you're building a theme based on Penscratch 2, use a find and replace
+		 * to change 'penscratch-2' to the name of your theme in all the template files
+		 */
+		load_theme_textdomain( 'penscratch-2', get_template_directory() . '/languages' );
+
+		// Add default posts and comments RSS feed links to head.
+		add_theme_support( 'automatic-feed-links' );
+
+		/*
+		 * Let WordPress manage the document title.
+		 * By adding theme support, we declare that this theme does not use a
+		 * hard-coded <title> 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 http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
+		 */
+		add_theme_support( 'post-thumbnails' );
+		add_image_size( 'penscratch-2-featured', '656', '300', true );
+
+		// This theme uses wp_nav_menu() in one location.
+		register_nav_menus(
+			array(
+				'menu-1' => esc_html__( 'Header', 'penscratch-2' ),
+			)
+		);
 
 
-	// Add default posts and comments RSS feed links to head.
-	add_theme_support( 'automatic-feed-links' );
+		add_editor_style( array( 'editor-style.css', penscratch_2_fonts_url() ) );
 
 
-	/*
-	 * Let WordPress manage the document title.
-	 * By adding theme support, we declare that this theme does not use a
-	 * hard-coded <title> tag in the document head, and expect WordPress to
-	 * provide it for us.
-	 */
-	add_theme_support( 'title-tag' );
+		/*
+		 * 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',
+			)
+		);
 
 
-	/*
-	 * 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' );
-	add_image_size( 'penscratch-2-featured', '656', '300', true );
+		// Enable support for custom logo.
+		add_theme_support(
+			'custom-logo',
+			array(
+				'height'      => 400,
+				'width'       => 1200,
+				'flex-height' => true,
+				'flex-width'  => true,
+			)
+		);
 
 
-	// This theme uses wp_nav_menu() in one location.
-	register_nav_menus( array(
-		'menu-1' => esc_html__( 'Header', 'penscratch-2' ),
-	) );
+		// Add theme support for selective refresh for widgets.
+		add_theme_support( 'customize-selective-refresh-widgets' );
+
+		// Setup the WordPress core custom background feature.
+		add_theme_support(
+			'custom-background',
+			apply_filters(
+				'penscratch_2_custom_background_args',
+				array(
+					'default-color' => 'eeeeee',
+					'default-image' => '',
+				)
+			)
+		);
 
 
-	add_editor_style( array( 'editor-style.css', penscratch_2_fonts_url() ) );
+		// Add support for responsive embeds.
+		add_theme_support( 'responsive-embeds' );
 
 
-	/*
-	 * 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'
-	) );
-
-	// Enable support for custom logo.
-	add_theme_support( 'custom-logo', array(
-		'height'      => 400,
-		'width'       => 1200,
-		'flex-height' => true,
-		'flex-width'  => true
-	) );
-
-	// Add theme support for selective refresh for widgets.
-	add_theme_support( 'customize-selective-refresh-widgets' );
-
-	// Setup the WordPress core custom background feature.
-	add_theme_support( 'custom-background', apply_filters( 'penscratch_2_custom_background_args', array(
-		'default-color' => 'eeeeee',
-		'default-image' => '',
-	) ) );
-
-	// Add support for responsive embeds.
-	add_theme_support( 'responsive-embeds' );
-
-	// Add custom colors to Gutenberg
-	add_theme_support(
-		'editor-color-palette', array(
-			array(
-				'name'  => esc_html__( 'Dark Green', 'penscratch-2' ),
-				'slug' => 'dark-green',
-				'color' => '#1c7c7c',
-			),
+		// Add custom colors to Gutenberg
+		add_theme_support(
+			'editor-color-palette',
 			array(
 			array(
-				'name'  => esc_html__( 'Dark Gray', 'penscratch-2' ),
-				'slug' => 'dark-gray',
-				'color' => '#666',
-			),
-			array(
-				'name'  => esc_html__( 'Medium Gray', 'penscratch-2' ),
-				'slug' => 'medium-gray',
-				'color' => '#999',
-			),
-			array(
-				'name'  => esc_html__( 'Light Gray', 'penscratch-2' ),
-				'slug' => 'light-gray',
-				'color' => '#eee',
-			),
-			array(
-				'name'  => esc_html__( 'White', 'penscratch-2' ),
-				'slug' => 'white',
-				'color' => '#fff',
-			),
-		)
-	);
+				array(
+					'name'  => esc_html__( 'Dark Green', 'penscratch-2' ),
+					'slug'  => 'dark-green',
+					'color' => '#1c7c7c',
+				),
+				array(
+					'name'  => esc_html__( 'Dark Gray', 'penscratch-2' ),
+					'slug'  => 'dark-gray',
+					'color' => '#666',
+				),
+				array(
+					'name'  => esc_html__( 'Medium Gray', 'penscratch-2' ),
+					'slug'  => 'medium-gray',
+					'color' => '#999',
+				),
+				array(
+					'name'  => esc_html__( 'Light Gray', 'penscratch-2' ),
+					'slug'  => 'light-gray',
+					'color' => '#eee',
+				),
+				array(
+					'name'  => esc_html__( 'White', 'penscratch-2' ),
+					'slug'  => 'white',
+					'color' => '#fff',
+				),
+			)
+		);
 
 
-}
+	}
 endif; // penscratch_2_setup
 endif; // penscratch_2_setup
 add_action( 'after_setup_theme', 'penscratch_2_setup' );
 add_action( 'after_setup_theme', 'penscratch_2_setup' );
 
 
@@ -139,38 +157,46 @@ add_action( 'template_redirect', 'penscratch_2_adjust_content_width' );
  * @link http://codex.wordpress.org/Function_Reference/register_sidebar
  * @link http://codex.wordpress.org/Function_Reference/register_sidebar
  */
  */
 function penscratch_2_widgets_init() {
 function penscratch_2_widgets_init() {
-	register_sidebar( array(
-		'name'          => esc_html__( 'Sidebar', 'penscratch-2' ),
-		'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>',
-	) );
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 1', 'penscratch-2' ),
-		'id'            => 'sidebar-2',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h1 class="widget-title">',
-		'after_title'   => '</h1>',
-	) );
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 2', 'penscratch-2' ),
-		'id'            => 'sidebar-3',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h1 class="widget-title">',
-		'after_title'   => '</h1>',
-	) );
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 3', 'penscratch-2' ),
-		'id'            => 'sidebar-4',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h1 class="widget-title">',
-		'after_title'   => '</h1>',
-	) );
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Sidebar', 'penscratch-2' ),
+			'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>',
+		)
+	);
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 1', 'penscratch-2' ),
+			'id'            => 'sidebar-2',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h1 class="widget-title">',
+			'after_title'   => '</h1>',
+		)
+	);
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 2', 'penscratch-2' ),
+			'id'            => 'sidebar-3',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h1 class="widget-title">',
+			'after_title'   => '</h1>',
+		)
+	);
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 3', 'penscratch-2' ),
+			'id'            => 'sidebar-4',
+			'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', 'penscratch_2_widgets_init' );
 add_action( 'widgets_init', 'penscratch_2_widgets_init' );
 
 
@@ -211,7 +237,7 @@ add_action( 'enqueue_block_editor_assets', 'penscratch_2_block_editor_styles' );
  * Register Google Fonts
  * Register Google Fonts
  */
  */
 function penscratch_2_fonts_url() {
 function penscratch_2_fonts_url() {
-    $fonts_url = '';
+	$fonts_url = '';
 
 
 	/* Translators: If there are characters in your language that are not
 	/* Translators: If there are characters in your language that are not
 	 * supported by Roboto Slab, translate this to 'off'. Do not translate
 	 * supported by Roboto Slab, translate this to 'off'. Do not translate
@@ -219,9 +245,9 @@ function penscratch_2_fonts_url() {
 	 */
 	 */
 	$robotoslab = esc_html_x( 'on', 'Roboto Slab font: on or off', 'penscratch-2' );
 	$robotoslab = esc_html_x( 'on', 'Roboto Slab font: on or off', 'penscratch-2' );
 
 
-	if ( 'off' !== $robotoslab  ) {
+	if ( 'off' !== $robotoslab ) {
 
 
-		$font_families = array();
+		$font_families   = array();
 		$font_families[] = 'Roboto Slab:300,400,700';
 		$font_families[] = 'Roboto Slab:300,400,700';
 
 
 		$query_args = array(
 		$query_args = array(

+ 78 - 57
photos/functions.php

@@ -55,19 +55,28 @@ if ( ! function_exists( 'photos_setup' ) ) :
 		 * Switch default core markup for search form, comment form, and comments
 		 * Switch default core markup for search form, comment form, and comments
 		 * to output valid HTML5.
 		 * to output valid HTML5.
 		 */
 		 */
-		add_theme_support( 'html5', array(
-			'search-form',
-			'comment-form',
-			'comment-list',
-			'gallery',
-			'caption',
-		) );
+		add_theme_support(
+			'html5',
+			array(
+				'search-form',
+				'comment-form',
+				'comment-list',
+				'gallery',
+				'caption',
+			)
+		);
 
 
 		// Set up the WordPress core custom background feature.
 		// Set up the WordPress core custom background feature.
-		add_theme_support( 'custom-background', apply_filters( 'photos_custom_background_args', array(
-			'default-color' => 'ffffff',
-			'default-image' => '',
-		) ) );
+		add_theme_support(
+			'custom-background',
+			apply_filters(
+				'photos_custom_background_args',
+				array(
+					'default-color' => 'ffffff',
+					'default-image' => '',
+				)
+			)
+		);
 
 
 		// Add theme support for selective refresh for widgets.
 		// Add theme support for selective refresh for widgets.
 		add_theme_support( 'customize-selective-refresh-widgets' );
 		add_theme_support( 'customize-selective-refresh-widgets' );
@@ -77,16 +86,19 @@ if ( ! function_exists( 'photos_setup' ) ) :
 		 *
 		 *
 		 * @link https://codex.wordpress.org/Theme_Logo
 		 * @link https://codex.wordpress.org/Theme_Logo
 		 */
 		 */
-		add_theme_support( 'custom-logo', array(
-			'height'      => 360,
-			'width'       => 720,
-			'flex-width'  => true,
-			'flex-height' => true,
-			'header-text' => array(
-				'site-title',
-				'site-description',
-			),
-		) );
+		add_theme_support(
+			'custom-logo',
+			array(
+				'height'      => 360,
+				'width'       => 720,
+				'flex-width'  => true,
+				'flex-height' => true,
+				'header-text' => array(
+					'site-title',
+					'site-description',
+				),
+			)
+		);
 
 
 		/* Gutenberg! */
 		/* Gutenberg! */
 		add_theme_support( 'align-wide' );
 		add_theme_support( 'align-wide' );
@@ -94,33 +106,36 @@ if ( ! function_exists( 'photos_setup' ) ) :
 		// Add support for responsive embeds.
 		// Add support for responsive embeds.
 		add_theme_support( 'responsive-embeds' );
 		add_theme_support( 'responsive-embeds' );
 
 
-	    add_theme_support( 'editor-color-palette', array(
+		add_theme_support(
+			'editor-color-palette',
 			array(
 			array(
-				'name' => esc_html__( 'red', 'photos' ),
-				'slug' => 'red',
-				'color' => '#d63031',
-			),
-			array(
-				'name' => esc_html__( 'charcoal', 'photos' ),
-				'slug' => 'charcoal',
-				'color' => '#111',
-			),
-			array(
-				'name' => esc_html__( 'very light gray', 'photos' ),
-				'slug' => 'very-light-gray',
-				'color' => '#f0f0f0',
-			),
-			array(
-				'name' => esc_html__( 'very dark gray', 'photos' ),
-				'slug' => 'very-dark-gray',
-				'color' => '#404040',
-			),
-			array(
-				'name' => esc_html__( 'medium gray', 'photos' ),
-				'slug' => 'medium-gray',
-				'color' => '#606060',
+				array(
+					'name'  => esc_html__( 'red', 'photos' ),
+					'slug'  => 'red',
+					'color' => '#d63031',
+				),
+				array(
+					'name'  => esc_html__( 'charcoal', 'photos' ),
+					'slug'  => 'charcoal',
+					'color' => '#111',
+				),
+				array(
+					'name'  => esc_html__( 'very light gray', 'photos' ),
+					'slug'  => 'very-light-gray',
+					'color' => '#f0f0f0',
+				),
+				array(
+					'name'  => esc_html__( 'very dark gray', 'photos' ),
+					'slug'  => 'very-dark-gray',
+					'color' => '#404040',
+				),
+				array(
+					'name'  => esc_html__( 'medium gray', 'photos' ),
+					'slug'  => 'medium-gray',
+					'color' => '#606060',
+				),
 			)
 			)
-		) );
+		);
 
 
 	}
 	}
 endif;
 endif;
@@ -156,15 +171,17 @@ add_action( 'after_setup_theme', 'photos_content_width', 0 );
  * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
  * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
  */
  */
 function photos_widgets_init() {
 function photos_widgets_init() {
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer', 'photos' ),
-		'id'            => 'sidebar-1',
-		'description'   => esc_html__( 'These widgets will be displayed at the bottom of each page.', 'photos' ),
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer', 'photos' ),
+			'id'            => 'sidebar-1',
+			'description'   => esc_html__( 'These widgets will be displayed at the bottom of each page.', 'photos' ),
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
 }
 }
 add_action( 'widgets_init', 'photos_widgets_init' );
 add_action( 'widgets_init', 'photos_widgets_init' );
 
 
@@ -191,7 +208,12 @@ function photos_scripts() {
 	wp_enqueue_script( 'photos-navigation', get_theme_file_uri( '/js/navigation.js' ), array( 'jquery' ), '1.0', true );
 	wp_enqueue_script( 'photos-navigation', get_theme_file_uri( '/js/navigation.js' ), array( 'jquery' ), '1.0', true );
 	$photos_l10n['expand']   = esc_attr__( 'Expand child menu', 'photos' );
 	$photos_l10n['expand']   = esc_attr__( 'Expand child menu', 'photos' );
 	$photos_l10n['collapse'] = esc_attr__( 'Collapse child menu', 'photos' );
 	$photos_l10n['collapse'] = esc_attr__( 'Collapse child menu', 'photos' );
-	$photos_l10n['icon']     = photos_get_svg( array( 'icon' => 'expand', 'fallback' => true ) );
+	$photos_l10n['icon']     = photos_get_svg(
+		array(
+			'icon'     => 'expand',
+			'fallback' => true,
+		)
+	);
 
 
 	wp_localize_script( 'photos-navigation', 'photosScreenReaderText', $photos_l10n );
 	wp_localize_script( 'photos-navigation', 'photosScreenReaderText', $photos_l10n );
 
 
@@ -240,4 +262,3 @@ require get_template_directory() . '/inc/custom-header.php';
  * SVG icons functions and filters.
  * SVG icons functions and filters.
  */
  */
 require get_template_directory() . '/inc/icon-functions.php';
 require get_template_directory() . '/inc/icon-functions.php';
-

+ 141 - 113
pique/functions.php

@@ -45,44 +45,58 @@ if ( ! function_exists( 'pique_setup' ) ) :
 		add_image_size( 'pique-thumbnail-avatar', 100, 100, true );
 		add_image_size( 'pique-thumbnail-avatar', 100, 100, true );
 
 
 		// This theme uses wp_nav_menu() in three locations.
 		// This theme uses wp_nav_menu() in three locations.
-		register_nav_menus( array(
-			'primary'   => esc_html__( 'Primary Menu', 'pique' ),
-			'secondary' => esc_html__( 'Secondary Menu', 'pique' ),
-		) );
+		register_nav_menus(
+			array(
+				'primary'   => esc_html__( 'Primary Menu', 'pique' ),
+				'secondary' => esc_html__( 'Secondary Menu', 'pique' ),
+			)
+		);
 
 
 		/*
 		/*
 		 * Switch default core markup for search form, comment form, and comments
 		 * Switch default core markup for search form, comment form, and comments
 		 * to output valid HTML5.
 		 * to output valid HTML5.
 		 */
 		 */
-		add_theme_support( 'html5', array(
-			'search-form',
-			'comment-form',
-			'comment-list',
-			'gallery',
-			'caption',
-		) );
+		add_theme_support(
+			'html5',
+			array(
+				'search-form',
+				'comment-form',
+				'comment-list',
+				'gallery',
+				'caption',
+			)
+		);
 
 
 		/*
 		/*
 		 * Enable support for Post Formats.
 		 * Enable support for Post Formats.
 		 * See http://codex.wordpress.org/Post_Formats
 		 * See http://codex.wordpress.org/Post_Formats
 		 */
 		 */
-		add_theme_support( 'post-formats', array(
-			'aside',
-			'chat',
-			'gallery',
-			'image',
-			'video',
-			'quote',
-			'link',
-			'status',
-			'audio',
-		) );
+		add_theme_support(
+			'post-formats',
+			array(
+				'aside',
+				'chat',
+				'gallery',
+				'image',
+				'video',
+				'quote',
+				'link',
+				'status',
+				'audio',
+			)
+		);
 
 
 		// Set up the WordPress core custom background feature.
 		// Set up the WordPress core custom background feature.
-		add_theme_support( 'custom-background', apply_filters( 'pique_custom_background_args', array(
-			'default-color' => 'ffffff',
-			'default-image' => '',
-		) ) );
+		add_theme_support(
+			'custom-background',
+			apply_filters(
+				'pique_custom_background_args',
+				array(
+					'default-color' => 'ffffff',
+					'default-image' => '',
+				)
+			)
+		);
 
 
 		// Add support for responsive embeds.
 		// Add support for responsive embeds.
 		add_theme_support( 'responsive-embeds' );
 		add_theme_support( 'responsive-embeds' );
@@ -91,43 +105,46 @@ if ( ! function_exists( 'pique_setup' ) ) :
 		add_theme_support( 'align-wide' );
 		add_theme_support( 'align-wide' );
 
 
 		// Add support for custom color scheme.
 		// Add support for custom color scheme.
-		add_theme_support( 'editor-color-palette', array(
-			array(
-				'name'  => esc_html__( 'Dark Blue', 'pique' ),
-				'slug'  => 'dark-blue',
-				'color' => '#293940',
-			),
+		add_theme_support(
+			'editor-color-palette',
 			array(
 			array(
-				'name'  => esc_html__( 'Medium Blue', 'pique' ),
-				'slug'  => 'medium-blue',
-				'color' => '#3c7993',
-			),
-			array(
-				'name'  => esc_html__( 'Light Blue', 'pique' ),
-				'slug'  => 'light-blue',
-				'color' => '#83b6cc',
-			),
-			array(
-				'name'  => esc_html__( 'Dark Brown', 'pique' ),
-				'slug'  => 'dark-brown',
-				'color' => '#2d2a26',
-			),
-			array(
-				'name'  => esc_html__( 'Dark Gray', 'pique' ),
-				'slug'  => 'dark-gray',
-				'color' => '#5d5d5d',
-			),
-			array(
-				'name'  => esc_html__( 'Medium Gray', 'pique' ),
-				'slug'  => 'medium-gray',
-				'color' => '#a9a9a9',
-			),
-			array(
-				'name'  => esc_html__( 'White', 'pique' ),
-				'slug'  => 'white',
-				'color' => '#fff',
-			),
-		) );
+				array(
+					'name'  => esc_html__( 'Dark Blue', 'pique' ),
+					'slug'  => 'dark-blue',
+					'color' => '#293940',
+				),
+				array(
+					'name'  => esc_html__( 'Medium Blue', 'pique' ),
+					'slug'  => 'medium-blue',
+					'color' => '#3c7993',
+				),
+				array(
+					'name'  => esc_html__( 'Light Blue', 'pique' ),
+					'slug'  => 'light-blue',
+					'color' => '#83b6cc',
+				),
+				array(
+					'name'  => esc_html__( 'Dark Brown', 'pique' ),
+					'slug'  => 'dark-brown',
+					'color' => '#2d2a26',
+				),
+				array(
+					'name'  => esc_html__( 'Dark Gray', 'pique' ),
+					'slug'  => 'dark-gray',
+					'color' => '#5d5d5d',
+				),
+				array(
+					'name'  => esc_html__( 'Medium Gray', 'pique' ),
+					'slug'  => 'medium-gray',
+					'color' => '#a9a9a9',
+				),
+				array(
+					'name'  => esc_html__( 'White', 'pique' ),
+					'slug'  => 'white',
+					'color' => '#fff',
+				),
+			)
+		);
 	}
 	}
 endif; // pique_setup
 endif; // pique_setup
 add_action( 'after_setup_theme', 'pique_setup' );
 add_action( 'after_setup_theme', 'pique_setup' );
@@ -163,45 +180,53 @@ add_action( 'template_redirect', 'pique_content_width_tweak' );
  * @link http://codex.wordpress.org/Function_Reference/register_sidebar
  * @link http://codex.wordpress.org/Function_Reference/register_sidebar
  */
  */
 function pique_widgets_init() {
 function pique_widgets_init() {
-	register_sidebar( array(
-		'name'          => esc_html__( 'Sidebar', 'pique' ),
-		'id'            => 'sidebar-1',
-		'description'   => esc_html__( 'Add widgets here to appear in your sidebar', 'pique' ),
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'First Footer Widget Area', 'pique' ),
-		'id'            => 'sidebar-2',
-		'description'   => esc_html__( 'Add widgets here to appear in your footer', 'pique' ),
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Second Footer Widget Area', 'pique' ),
-		'id'            => 'sidebar-3',
-		'description'   => esc_html__( 'Add widgets here to appear in your footer', 'pique' ),
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Third Footer Widget Area', 'pique' ),
-		'id'            => 'sidebar-4',
-		'description'   => esc_html__( 'Add widgets here to appear in your footer', 'pique' ),
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Sidebar', 'pique' ),
+			'id'            => 'sidebar-1',
+			'description'   => esc_html__( 'Add widgets here to appear in your sidebar', 'pique' ),
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'First Footer Widget Area', 'pique' ),
+			'id'            => 'sidebar-2',
+			'description'   => esc_html__( 'Add widgets here to appear in your footer', 'pique' ),
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Second Footer Widget Area', 'pique' ),
+			'id'            => 'sidebar-3',
+			'description'   => esc_html__( 'Add widgets here to appear in your footer', 'pique' ),
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Third Footer Widget Area', 'pique' ),
+			'id'            => 'sidebar-4',
+			'description'   => esc_html__( 'Add widgets here to appear in your footer', 'pique' ),
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
 }
 }
 add_action( 'widgets_init', 'pique_widgets_init' );
 add_action( 'widgets_init', 'pique_widgets_init' );
 
 
@@ -321,7 +346,7 @@ function pique_query_vars( $qvars ) {
 	$qvars[] = 'pique_panel';
 	$qvars[] = 'pique_panel';
 	return $qvars;
 	return $qvars;
 }
 }
-add_filter( 'query_vars', 'pique_query_vars' , 10, 1 );
+add_filter( 'query_vars', 'pique_query_vars', 10, 1 );
 
 
 /**
 /**
  * Get random posts; a simple, more efficient approach.
  * Get random posts; a simple, more efficient approach.
@@ -329,11 +354,13 @@ add_filter( 'query_vars', 'pique_query_vars' , 10, 1 );
  * Also it works better with heavy caching.
  * Also it works better with heavy caching.
  */
  */
 function pique_get_random_posts( $number = 1, $post_type = 'post' ) {
 function pique_get_random_posts( $number = 1, $post_type = 'post' ) {
-	$query = new WP_Query( array(
-		'posts_per_page' => 100,
-		'fields'         => 'ids',
-		'post_type'      => $post_type
-	) );
+	$query = new WP_Query(
+		array(
+			'posts_per_page' => 100,
+			'fields'         => 'ids',
+			'post_type'      => $post_type,
+		)
+	);
 
 
 	$post_ids = $query->posts;
 	$post_ids = $query->posts;
 
 
@@ -341,11 +368,13 @@ function pique_get_random_posts( $number = 1, $post_type = 'post' ) {
 
 
 	$post_ids = array_splice( $post_ids, 0, $number );
 	$post_ids = array_splice( $post_ids, 0, $number );
 
 
-	$random_posts = get_posts( array(
-		'post__in'    => $post_ids,
-		'numberposts' => count( $post_ids ),
-		'post_type'   => $post_type
-	) );
+	$random_posts = get_posts(
+		array(
+			'post__in'    => $post_ids,
+			'numberposts' => count( $post_ids ),
+			'post_type'   => $post_type,
+		)
+	);
 
 
 	return $random_posts;
 	return $random_posts;
 }
 }
@@ -381,4 +410,3 @@ require get_template_directory() . '/inc/jetpack.php';
 if ( class_exists( 'WooCommerce' ) ) {
 if ( class_exists( 'WooCommerce' ) ) {
 	require get_template_directory() . '/inc/woocommerce.php';
 	require get_template_directory() . '/inc/woocommerce.php';
 }
 }
-

+ 51 - 52
professional-business/functions.php

@@ -8,63 +8,62 @@
  */
  */
 
 
 if ( ! function_exists( 'professional_business_setup' ) ) :
 if ( ! function_exists( 'professional_business_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 professional_business_setup() {
-
 	/**
 	/**
-	 * Add support for core custom logo.
+	 * Sets up theme defaults and registers support for various WordPress features.
 	 *
 	 *
-	 * @link https://codex.wordpress.org/Theme_Logo
+	 * 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.
 	 */
 	 */
-	add_theme_support(
-		'custom-logo',
-		array(
-			'height'      => 120,
-			'width'       => 190,
-			'flex-width'  => true,
-			'flex-height' => false,
-			'header-text' => array( 'site-title' ),
-		)
-	);
-
-	// Editor color palette.
-	add_theme_support(
-		'editor-color-palette',
-		array(
-			array(
-				'name'  => __( 'Primary', 'professional-business' ),
-				'slug'  => 'primary',
-				'color' => '#0073aa', // $color__link
-			),
-			array(
-				'name'  => __( 'Secondary', 'professional-business' ),
-				'slug'  => 'secondary',
-				'color' => '#005077', // $color__border-link-hover
-			),
+	function professional_business_setup() {
+		/**
+		 * Add support for core custom logo.
+		 *
+		 * @link https://codex.wordpress.org/Theme_Logo
+		 */
+		add_theme_support(
+			'custom-logo',
 			array(
 			array(
-				'name'  => __( 'Dark Gray', 'professional-business' ),
-				'slug'  => 'dark-gray',
-				'color' => '#1e1e1e', // $color__text-main
-			),
-			array(
-				'name'  => __( 'Light Gray', 'professional-business' ),
-				'slug'  => 'light-gray',
-				'color' => '#767676', // $color__text-light
-			),
+				'height'      => 120,
+				'width'       => 190,
+				'flex-width'  => true,
+				'flex-height' => false,
+				'header-text' => array( 'site-title' ),
+			)
+		);
+
+		// Editor color palette.
+		add_theme_support(
+			'editor-color-palette',
 			array(
 			array(
-				'name'  => __( 'White', 'professional-business' ),
-				'slug'  => 'white',
-				'color' => '#ffffff',
-			),
-		)
-	);
-}
+				array(
+					'name'  => __( 'Primary', 'professional-business' ),
+					'slug'  => 'primary',
+					'color' => '#0073aa', // $color__link
+				),
+				array(
+					'name'  => __( 'Secondary', 'professional-business' ),
+					'slug'  => 'secondary',
+					'color' => '#005077', // $color__border-link-hover
+				),
+				array(
+					'name'  => __( 'Dark Gray', 'professional-business' ),
+					'slug'  => 'dark-gray',
+					'color' => '#1e1e1e', // $color__text-main
+				),
+				array(
+					'name'  => __( 'Light Gray', 'professional-business' ),
+					'slug'  => 'light-gray',
+					'color' => '#767676', // $color__text-light
+				),
+				array(
+					'name'  => __( 'White', 'professional-business' ),
+					'slug'  => 'white',
+					'color' => '#ffffff',
+				),
+			)
+		);
+	}
 endif; // professional_business_setup
 endif; // professional_business_setup
 add_action( 'after_setup_theme', 'professional_business_setup', 30 );
 add_action( 'after_setup_theme', 'professional_business_setup', 30 );
 
 

+ 113 - 92
publication/functions.php

@@ -13,116 +13,129 @@ if ( version_compare( $GLOBALS['wp_version'], '4.1-alpha', '<' ) ) {
 }
 }
 
 
 if ( ! function_exists( 'publication_setup' ) ) :
 if ( ! function_exists( 'publication_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 publication_setup() {
-	/*
-	 * Make theme available for translation.
-	 * Translations can be filed in the /languages/ directory.
-	 * If you're building a theme based on Publication, use a find and replace
-	 * to change 'publication' to the name of your theme in all the template files
+	/**
+	 * 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.
 	 */
 	 */
-	load_theme_textdomain( 'publication', get_template_directory() . '/languages' );
 
 
-	// Add default posts and comments RSS feed links to head.
-	add_theme_support( 'automatic-feed-links' );
+	function publication_setup() {
+		/*
+		 * Make theme available for translation.
+		 * Translations can be filed in the /languages/ directory.
+		 * If you're building a theme based on Publication, use a find and replace
+		 * to change 'publication' to the name of your theme in all the template files
+		 */
+		load_theme_textdomain( 'publication', get_template_directory() . '/languages' );
 
 
-	/*
-	 * Let WordPress manage the document title.
-	 * By adding theme support, we declare that this theme does not use a
-	 * hard-coded <title> tag in the document head, and expect WordPress to
-	 * provide it for us.
-	 */
-	add_theme_support( 'title-tag' );
+		// Add default posts and comments RSS feed links to head.
+		add_theme_support( 'automatic-feed-links' );
+
+		/*
+		 * Let WordPress manage the document title.
+		 * By adding theme support, we declare that this theme does not use a
+		 * hard-coded <title> tag in the document head, and expect WordPress to
+		 * provide it for us.
+		 */
+		add_theme_support( 'title-tag' );
 
 
-	// Add support for responsive embeds.
+		// Add support for responsive embeds.
 		add_theme_support( 'responsive-embeds' );
 		add_theme_support( 'responsive-embeds' );
 
 
 		/**
 		/**
 		 * Gutenberg wide and full images support
 		 * Gutenberg wide and full images support
 		 */
 		 */
 		add_theme_support( 'align-wide' );
 		add_theme_support( 'align-wide' );
-		
+
 		// Add custom colors to Gutenberg
 		// Add custom colors to Gutenberg
 		add_theme_support(
 		add_theme_support(
-			'editor-color-palette', array(
+			'editor-color-palette',
+			array(
 				array(
 				array(
 					'name'  => esc_html__( 'Black', 'publication' ),
 					'name'  => esc_html__( 'Black', 'publication' ),
-					'slug' => 'black',
+					'slug'  => 'black',
 					'color' => '#222',
 					'color' => '#222',
 				),
 				),
 				array(
 				array(
 					'name'  => esc_html__( 'Dark Gray', 'publication' ),
 					'name'  => esc_html__( 'Dark Gray', 'publication' ),
-					'slug' => 'dark-gray',
+					'slug'  => 'dark-gray',
 					'color' => '#474f53',
 					'color' => '#474f53',
 				),
 				),
 				array(
 				array(
 					'name'  => esc_html__( 'Medium Gray', 'publication' ),
 					'name'  => esc_html__( 'Medium Gray', 'publication' ),
-					'slug' => 'medium-gray',
+					'slug'  => 'medium-gray',
 					'color' => '#a5a29d',
 					'color' => '#a5a29d',
 				),
 				),
 				array(
 				array(
 					'name'  => esc_html__( 'Light Gray', 'publication' ),
 					'name'  => esc_html__( 'Light Gray', 'publication' ),
-					'slug' => 'light-gray',
+					'slug'  => 'light-gray',
 					'color' => '#eeece8',
 					'color' => '#eeece8',
 				),
 				),
 				array(
 				array(
 					'name'  => esc_html__( 'White', 'publication' ),
 					'name'  => esc_html__( 'White', 'publication' ),
-					'slug' => 'white',
+					'slug'  => 'white',
 					'color' => '#ffffff',
 					'color' => '#ffffff',
 				),
 				),
 				array(
 				array(
 					'name'  => esc_html__( 'Orange', 'publication' ),
 					'name'  => esc_html__( 'Orange', 'publication' ),
-					'slug' => 'orange',
+					'slug'  => 'orange',
 					'color' => '#ef7d0b',
 					'color' => '#ef7d0b',
 				),
 				),
 				array(
 				array(
 					'name'  => esc_html__( 'Dark Orange', 'publication' ),
 					'name'  => esc_html__( 'Dark Orange', 'publication' ),
-					'slug' => 'dark-orange',
+					'slug'  => 'dark-orange',
 					'color' => '#9c8012',
 					'color' => '#9c8012',
 				),
 				),
 			)
 			)
 		);
 		);
 
 
-	/*
-	 * 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' );
-	set_post_thumbnail_size( 144, 144, true );
-	add_image_size( 'publication-hero', 2000, 1500, true );
-	add_image_size( 'publication-navigation', 1055, 132, true );
-
-	// This theme uses wp_nav_menu() in two locations.
-	register_nav_menus( array(
-		'primary' => esc_html__( 'Primary Menu', 'publication' ),
-		'social'  => esc_html__( 'Social Menu', 'publication' ),
-	) );
-
-	/*
-	 * 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',
-	) );
-	
-	// Set up the WordPress core custom background feature.
-	add_theme_support( 'custom-background', apply_filters( 'publication_custom_background_args', array(
-		'default-color' => 'ffffff',
-		'default-image' => '',
-	) ) );
-}
+		/*
+		 * 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' );
+		set_post_thumbnail_size( 144, 144, true );
+		add_image_size( 'publication-hero', 2000, 1500, true );
+		add_image_size( 'publication-navigation', 1055, 132, true );
+
+		// This theme uses wp_nav_menu() in two locations.
+		register_nav_menus(
+			array(
+				'primary' => esc_html__( 'Primary Menu', 'publication' ),
+				'social'  => esc_html__( 'Social Menu', 'publication' ),
+			)
+		);
+
+		/*
+		 * 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',
+			)
+		);
+
+		// Set up the WordPress core custom background feature.
+		add_theme_support(
+			'custom-background',
+			apply_filters(
+				'publication_custom_background_args',
+				array(
+					'default-color' => 'ffffff',
+					'default-image' => '',
+				)
+			)
+		);
+	}
 endif; // publication_setup
 endif; // publication_setup
 add_action( 'after_setup_theme', 'publication_setup' );
 add_action( 'after_setup_theme', 'publication_setup' );
 
 
@@ -144,24 +157,28 @@ add_action( 'after_setup_theme', 'publication_content_width', 0 );
  * @link http://codex.wordpress.org/Function_Reference/register_sidebar
  * @link http://codex.wordpress.org/Function_Reference/register_sidebar
  */
  */
 function publication_widgets_init() {
 function publication_widgets_init() {
-	register_sidebar( array(
-		'name'          => esc_html__( 'Sidebar One', 'publication' ),
-		'id'            => 'sidebar-1',
-		'description'   => '',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-	register_sidebar( array(
-		'name'          => esc_html__( 'Sidebar Two', 'publication' ),
-		'id'            => 'sidebar-2',
-		'description'   => '',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Sidebar One', 'publication' ),
+			'id'            => 'sidebar-1',
+			'description'   => '',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Sidebar Two', 'publication' ),
+			'id'            => 'sidebar-2',
+			'description'   => '',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
 }
 }
 add_action( 'widgets_init', 'publication_widgets_init' );
 add_action( 'widgets_init', 'publication_widgets_init' );
 
 
@@ -198,7 +215,7 @@ function publication_lato_neuton_fonts_url() {
 			'family' => urlencode( implode( '|', $font_families ) ),
 			'family' => urlencode( implode( '|', $font_families ) ),
 			'subset' => urlencode( 'latin,latin-ext' ), // add extra subset
 			'subset' => urlencode( 'latin,latin-ext' ), // add extra subset
 		);
 		);
-		$fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
+		$fonts_url  = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
 	}
 	}
 
 
 	return $fonts_url;
 	return $fonts_url;
@@ -237,7 +254,7 @@ function publication_oswald_inconsolata_fonts_url() {
 			'family' => urlencode( implode( '|', $font_families ) ),
 			'family' => urlencode( implode( '|', $font_families ) ),
 			'subset' => urlencode( 'latin,latin-ext' ), // add extra subset
 			'subset' => urlencode( 'latin,latin-ext' ), // add extra subset
 		);
 		);
-		$fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
+		$fonts_url  = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
 	}
 	}
 
 
 	return $fonts_url;
 	return $fonts_url;
@@ -270,10 +287,14 @@ function publication_scripts() {
 		wp_enqueue_script( 'comment-reply' );
 		wp_enqueue_script( 'comment-reply' );
 	}
 	}
 
 
-	wp_localize_script( 'publication-script', 'screenReaderText', array(
-		'expand'   => '<span class="screen-reader-text">' . __( 'expand child menu', 'publication' ) . '</span>',
-		'collapse' => '<span class="screen-reader-text">' . __( 'collapse child menu', 'publication' ) . '</span>',
-	) );
+	wp_localize_script(
+		'publication-script',
+		'screenReaderText',
+		array(
+			'expand'   => '<span class="screen-reader-text">' . __( 'expand child menu', 'publication' ) . '</span>',
+			'collapse' => '<span class="screen-reader-text">' . __( 'collapse child menu', 'publication' ) . '</span>',
+		)
+	);
 }
 }
 add_action( 'wp_enqueue_scripts', 'publication_scripts' );
 add_action( 'wp_enqueue_scripts', 'publication_scripts' );
 
 
@@ -281,7 +302,7 @@ add_action( 'wp_enqueue_scripts', 'publication_scripts' );
  * Gutenberg Editor Styles
  * Gutenberg Editor Styles
  */
  */
 function publication_editor_styles() {
 function publication_editor_styles() {
-	wp_enqueue_style( 'publication-editor-block-style', get_template_directory_uri() . '/editor-blocks.css');
+	wp_enqueue_style( 'publication-editor-block-style', get_template_directory_uri() . '/editor-blocks.css' );
 	wp_enqueue_style( 'publication-lato-neuton', publication_lato_neuton_fonts_url() );
 	wp_enqueue_style( 'publication-lato-neuton', publication_lato_neuton_fonts_url() );
 	wp_enqueue_style( 'publication-oswald-inconsolata', publication_oswald_inconsolata_fonts_url() );
 	wp_enqueue_style( 'publication-oswald-inconsolata', publication_oswald_inconsolata_fonts_url() );
 }
 }

+ 251 - 214
radcliffe-2/functions.php

@@ -8,194 +8,221 @@
  */
  */
 
 
 if ( ! function_exists( 'radcliffe_2_setup' ) ) :
 if ( ! function_exists( 'radcliffe_2_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 radcliffe_2_setup() {
-	/*
-	 * Make theme available for translation.
-	 * Translations can be filed in the /languages/ directory.
-	 * If you're building a theme based on _s, use a find and replace
-	 * to change 'radcliffe-2' to the name of your theme in all the template files.
-	 */
-	load_theme_textdomain( 'radcliffe-2', get_template_directory() . '/languages' );
-
-	// Add default posts and comments RSS feed links to head.
-	add_theme_support( 'automatic-feed-links' );
-
-	/*
-	 * Let WordPress manage the document title.
-	 * By adding theme support, we declare that this theme does not use a
-	 * hard-coded <title> 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.
+	/**
+	 * Sets up theme defaults and registers support for various WordPress features.
 	 *
 	 *
-	 * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
+	 * 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.
 	 */
 	 */
-	add_theme_support( 'post-thumbnails' );
-	add_image_size( 'radcliffe-post-image', 2000, 1500 );
 
 
-	// This theme uses wp_nav_menu() in one location.
-	register_nav_menus( array(
-		'menu-1' => esc_html__( 'Header', 'radcliffe-2' ),
-	) );
-
-	/*
-	 * 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 Custom Logo.
-	add_theme_support( 'custom-logo', array(
-		'width'       => 1200,
-		'height'      => 900,
-		'flex-width'  => true,
-		'flex-height' => true,
-		'header-text' => array( 'site-title', 'site-description' ),
-	) );
-
-	// Set up the WordPress core custom background feature.
-	add_theme_support( 'custom-background', apply_filters( 'radcliffe_2_custom_background_args', array(
-		'default-color' => 'ffffff',
-		'default-image' => '',
-	) ) );
-
-	// Add theme support for selective refresh for widgets.
-	add_theme_support( 'customize-selective-refresh-widgets' );
-
-	// Add support for responsive embeds.
-	add_theme_support( 'responsive-embeds' );
-
-	// Gutenberg: Add Custom Palette
-	$stylepack = get_theme_mod( 'active_style_pack' );
-
-	if ( 'vintage' === $stylepack ) {
-		add_theme_support( 'editor-color-palette', array(
-			array(
-				'name'  => esc_html__( 'Vintage Off-White', 'radcliffe-2' ),
-				'slug'  => 'vintage-off-white',
-				'color' => '#fff',
-			),
-			array(
-				'name'  => esc_html__( 'Vintage Light Brown', 'radcliffe-2' ),
-				'slug'  => 'vintage-light-brown',
-				'color' => '#c7c4b4',
-			),
-			array(
-				'name'  => esc_html__( 'Vintage Light Gray', 'radcliffe-2' ),
-				'slug'  => 'vintage-light-gray',
-				'color' => '#666',
-			),
+	function radcliffe_2_setup() {
+		/*
+		 * Make theme available for translation.
+		 * Translations can be filed in the /languages/ directory.
+		 * If you're building a theme based on _s, use a find and replace
+		 * to change 'radcliffe-2' to the name of your theme in all the template files.
+		 */
+		load_theme_textdomain( 'radcliffe-2', get_template_directory() . '/languages' );
+
+		// Add default posts and comments RSS feed links to head.
+		add_theme_support( 'automatic-feed-links' );
+
+		/*
+		 * Let WordPress manage the document title.
+		 * By adding theme support, we declare that this theme does not use a
+		 * hard-coded <title> 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' );
+		add_image_size( 'radcliffe-post-image', 2000, 1500 );
+
+		// This theme uses wp_nav_menu() in one location.
+		register_nav_menus(
 			array(
 			array(
-				'name'  => esc_html__( 'Vintage Dark Gray', 'radcliffe-2' ),
-				'slug'  => 'vintage-dark-gray',
-				'color' => '#222',
-			),
-			array(
-				'name'  => esc_html__( 'Vintage Blue', 'radcliffe-2' ),
-				'slug'  => 'vintage-blue',
-				'color' => '#2b6e9d',
+				'menu-1' => esc_html__( 'Header', 'radcliffe-2' ),
 			)
 			)
-		) );
-	} else if ( 'colorful' === $stylepack ) {
-		add_theme_support( 'editor-color-palette', array(
-			array(
-				'name'  => esc_html__( 'Colorful White', 'radcliffe-2' ),
-				'slug'  => 'colorful-white',
-				'color' => '#fff',
-			),
-			array(
-				'name'  => esc_html__( 'Colorful Light Gray', 'radcliffe-2' ),
-				'slug'  => 'colorful-light-gray',
-				'color' => '#e5e5e5',
-			),
-			array(
-				'name'  => esc_html__( 'Colorful Dark Gray', 'radcliffe-2' ),
-				'slug'  => 'colorful-dark-gray',
-				'color' => '#222222',
-			),
+		);
+
+		/*
+		 * Switch default core markup for search form, comment form, and comments
+		 * to output valid HTML5.
+		 */
+		add_theme_support(
+			'html5',
 			array(
 			array(
-				'name'  => esc_html__( 'Colorful Blue', 'radcliffe-2' ),
-				'slug'  => 'colorful-blue',
-				'color' => '#4ba3c3',
-			),
-			array(
-				'name'  => esc_html__( 'Colorful Green', 'radcliffe-2' ),
-				'slug'  => 'colorful-green',
-				'color' => '#71db9d',
-			),
-			array(
-				'name'  => esc_html__( 'Colorful Orange', 'radcliffe-2' ),
-				'slug'  => 'colorful-orange',
-				'color' => '#d97059',
+				'search-form',
+				'comment-form',
+				'comment-list',
+				'gallery',
+				'caption',
 			)
 			)
-		) );
-	} else if ( 'modern' === $stylepack ) {
-		add_theme_support( 'editor-color-palette', array(
-			array(
-				'name'  => esc_html__( 'Modern White', 'radcliffe-2' ),
-				'slug'  => 'modern-white',
-				'color' => '#fff',
-			),
-			array(
-				'name'  => esc_html__( 'Modern Light Gray', 'radcliffe-2' ),
-				'slug'  => 'modern-light-gray',
-				'color' => '#f1f1f1',
-			),
-			array(
-				'name'  => esc_html__( 'Modern Medium Gray', 'radcliffe-2' ),
-				'slug' => 'modern-medium-gray',
-				'color' => '#aaa',
-			),
+		);
+
+		// Add theme support for Custom Logo.
+		add_theme_support(
+			'custom-logo',
 			array(
 			array(
-				'name'  => esc_html__( 'Modern Dark Gray', 'radcliffe-2' ),
-				'slug'  => 'modern-dark-gray',
-				'color' => '#222',
+				'width'       => 1200,
+				'height'      => 900,
+				'flex-width'  => true,
+				'flex-height' => true,
+				'header-text' => array( 'site-title', 'site-description' ),
 			)
 			)
-		) );
-	} else {
-		add_theme_support( 'editor-color-palette', array(
-			array(
-				'name'  => esc_html__( 'White', 'radcliffe-2' ),
-				'slug'  => 'white',
-				'color' => '#fff',
-			),
-			array(
-				'name'  => esc_html__( 'Dark Gray', 'radcliffe-2' ),
-				'slug'  => 'dark-gray',
-				'color' => '#222',
-			),
-			array(
-				'name'  => esc_html__( 'Light Gray', 'radcliffe-2' ),
-				'slug'  => 'light-gray',
-				'color' => '#666666',
-			),
-			array(
-				'name'  => esc_html__( 'Red', 'radcliffe-2' ),
-				'slug' => 'red',
-				'color' => '#ca2017',
+		);
+
+		// Set up the WordPress core custom background feature.
+		add_theme_support(
+			'custom-background',
+			apply_filters(
+				'radcliffe_2_custom_background_args',
+				array(
+					'default-color' => 'ffffff',
+					'default-image' => '',
+				)
 			)
 			)
-		) );
+		);
+
+		// Add theme support for selective refresh for widgets.
+		add_theme_support( 'customize-selective-refresh-widgets' );
+
+		// Add support for responsive embeds.
+		add_theme_support( 'responsive-embeds' );
+
+		// Gutenberg: Add Custom Palette
+		$stylepack = get_theme_mod( 'active_style_pack' );
+
+		if ( 'vintage' === $stylepack ) {
+			add_theme_support(
+				'editor-color-palette',
+				array(
+					array(
+						'name'  => esc_html__( 'Vintage Off-White', 'radcliffe-2' ),
+						'slug'  => 'vintage-off-white',
+						'color' => '#fff',
+					),
+					array(
+						'name'  => esc_html__( 'Vintage Light Brown', 'radcliffe-2' ),
+						'slug'  => 'vintage-light-brown',
+						'color' => '#c7c4b4',
+					),
+					array(
+						'name'  => esc_html__( 'Vintage Light Gray', 'radcliffe-2' ),
+						'slug'  => 'vintage-light-gray',
+						'color' => '#666',
+					),
+					array(
+						'name'  => esc_html__( 'Vintage Dark Gray', 'radcliffe-2' ),
+						'slug'  => 'vintage-dark-gray',
+						'color' => '#222',
+					),
+					array(
+						'name'  => esc_html__( 'Vintage Blue', 'radcliffe-2' ),
+						'slug'  => 'vintage-blue',
+						'color' => '#2b6e9d',
+					),
+				)
+			);
+		} elseif ( 'colorful' === $stylepack ) {
+			add_theme_support(
+				'editor-color-palette',
+				array(
+					array(
+						'name'  => esc_html__( 'Colorful White', 'radcliffe-2' ),
+						'slug'  => 'colorful-white',
+						'color' => '#fff',
+					),
+					array(
+						'name'  => esc_html__( 'Colorful Light Gray', 'radcliffe-2' ),
+						'slug'  => 'colorful-light-gray',
+						'color' => '#e5e5e5',
+					),
+					array(
+						'name'  => esc_html__( 'Colorful Dark Gray', 'radcliffe-2' ),
+						'slug'  => 'colorful-dark-gray',
+						'color' => '#222222',
+					),
+					array(
+						'name'  => esc_html__( 'Colorful Blue', 'radcliffe-2' ),
+						'slug'  => 'colorful-blue',
+						'color' => '#4ba3c3',
+					),
+					array(
+						'name'  => esc_html__( 'Colorful Green', 'radcliffe-2' ),
+						'slug'  => 'colorful-green',
+						'color' => '#71db9d',
+					),
+					array(
+						'name'  => esc_html__( 'Colorful Orange', 'radcliffe-2' ),
+						'slug'  => 'colorful-orange',
+						'color' => '#d97059',
+					),
+				)
+			);
+		} elseif ( 'modern' === $stylepack ) {
+			add_theme_support(
+				'editor-color-palette',
+				array(
+					array(
+						'name'  => esc_html__( 'Modern White', 'radcliffe-2' ),
+						'slug'  => 'modern-white',
+						'color' => '#fff',
+					),
+					array(
+						'name'  => esc_html__( 'Modern Light Gray', 'radcliffe-2' ),
+						'slug'  => 'modern-light-gray',
+						'color' => '#f1f1f1',
+					),
+					array(
+						'name'  => esc_html__( 'Modern Medium Gray', 'radcliffe-2' ),
+						'slug'  => 'modern-medium-gray',
+						'color' => '#aaa',
+					),
+					array(
+						'name'  => esc_html__( 'Modern Dark Gray', 'radcliffe-2' ),
+						'slug'  => 'modern-dark-gray',
+						'color' => '#222',
+					),
+				)
+			);
+		} else {
+			add_theme_support(
+				'editor-color-palette',
+				array(
+					array(
+						'name'  => esc_html__( 'White', 'radcliffe-2' ),
+						'slug'  => 'white',
+						'color' => '#fff',
+					),
+					array(
+						'name'  => esc_html__( 'Dark Gray', 'radcliffe-2' ),
+						'slug'  => 'dark-gray',
+						'color' => '#222',
+					),
+					array(
+						'name'  => esc_html__( 'Light Gray', 'radcliffe-2' ),
+						'slug'  => 'light-gray',
+						'color' => '#666666',
+					),
+					array(
+						'name'  => esc_html__( 'Red', 'radcliffe-2' ),
+						'slug'  => 'red',
+						'color' => '#ca2017',
+					),
+				)
+			);
+		}
+
+		// Add support for wide alignment
+		add_theme_support( 'align-wide' );
 	}
 	}
-
-	// Add support for wide alignment
-	add_theme_support( 'align-wide' );
-}
 endif;
 endif;
 add_action( 'after_setup_theme', 'radcliffe_2_setup' );
 add_action( 'after_setup_theme', 'radcliffe_2_setup' );
 
 
@@ -217,35 +244,41 @@ add_action( 'after_setup_theme', 'radcliffe_2_content_width', 0 );
  * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
  * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
  */
  */
 function radcliffe_2_widgets_init() {
 function radcliffe_2_widgets_init() {
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 1', 'radcliffe-2' ),
-		'id'            => 'sidebar-1',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 2', 'radcliffe-2' ),
-		'id'            => 'sidebar-2',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer 3', 'radcliffe-2' ),
-		'id'            => 'sidebar-3',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 1', 'radcliffe-2' ),
+			'id'            => 'sidebar-1',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 2', 'radcliffe-2' ),
+			'id'            => 'sidebar-2',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer 3', 'radcliffe-2' ),
+			'id'            => 'sidebar-3',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
 }
 }
 add_action( 'widgets_init', 'radcliffe_2_widgets_init' );
 add_action( 'widgets_init', 'radcliffe_2_widgets_init' );
 
 
@@ -265,12 +298,16 @@ function radcliffe_2_scripts() {
 
 
 	wp_enqueue_script( 'radcliffe-2-navigation', get_template_directory_uri() . '/assets/js/navigation.js', array(), '20151215', true );
 	wp_enqueue_script( 'radcliffe-2-navigation', get_template_directory_uri() . '/assets/js/navigation.js', array(), '20151215', true );
 
 
-	wp_localize_script( 'radcliffe-2-navigation', 'screenReaderText', array(
-		'expand'      => esc_html__( 'Expand child menu', 'radcliffe-2' ),
-		'collapse'    => esc_html__( 'Collapse child menu', 'radcliffe-2' ),
-		'icon_expand' => radcliffe_2_get_svg( array( 'icon' => 'expand' ) ),
-		'icon_zoom'   => radcliffe_2_get_svg( array( 'icon' => 'zoom' ) ),
-	) );
+	wp_localize_script(
+		'radcliffe-2-navigation',
+		'screenReaderText',
+		array(
+			'expand'      => esc_html__( 'Expand child menu', 'radcliffe-2' ),
+			'collapse'    => esc_html__( 'Collapse child menu', 'radcliffe-2' ),
+			'icon_expand' => radcliffe_2_get_svg( array( 'icon' => 'expand' ) ),
+			'icon_zoom'   => radcliffe_2_get_svg( array( 'icon' => 'zoom' ) ),
+		)
+	);
 
 
 	wp_enqueue_script( 'radcliffe-2-skip-link-focus-fix', get_template_directory_uri() . '/assets/js/skip-link-focus-fix.js', array(), '20151215', true );
 	wp_enqueue_script( 'radcliffe-2-skip-link-focus-fix', get_template_directory_uri() . '/assets/js/skip-link-focus-fix.js', array(), '20151215', true );
 
 
@@ -293,9 +330,9 @@ function radcliffe_2_editor_styles() {
 
 
 	if ( 'colorful' === $stylepack ) {
 	if ( 'colorful' === $stylepack ) {
 		wp_enqueue_style( 'radcliffe-2-editor-style-colorful', get_template_directory_uri() . '/assets/css/editor-style-colorful.css' );
 		wp_enqueue_style( 'radcliffe-2-editor-style-colorful', get_template_directory_uri() . '/assets/css/editor-style-colorful.css' );
-	} else if ( 'modern' === $stylepack ) {
+	} elseif ( 'modern' === $stylepack ) {
 		wp_enqueue_style( 'radcliffe-2-editor-style-modern', get_template_directory_uri() . '/assets/css/editor-style-modern.css' );
 		wp_enqueue_style( 'radcliffe-2-editor-style-modern', get_template_directory_uri() . '/assets/css/editor-style-modern.css' );
-	} else if ( 'vintage' === $stylepack ) {
+	} elseif ( 'vintage' === $stylepack ) {
 		wp_enqueue_style( 'radcliffe-2-editor-style-vintage', get_template_directory_uri() . '/assets/css/editor-style-vintage.css' );
 		wp_enqueue_style( 'radcliffe-2-editor-style-vintage', get_template_directory_uri() . '/assets/css/editor-style-vintage.css' );
 	}
 	}
 
 

+ 172 - 143
rebalance/functions.php

@@ -8,138 +8,157 @@
  */
  */
 
 
 if ( ! function_exists( 'rebalance_setup' ) ) :
 if ( ! function_exists( 'rebalance_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 rebalance_setup() {
-	/*
-	 * Make theme available for translation.
-	 * Translations can be filed in the /languages/ directory.
-	 * If you're building a theme based on rebalance, use a find and replace
-	 * to change 'rebalance' to the name of your theme in all the template files.
-	 */
-	load_theme_textdomain( 'rebalance', get_template_directory() . '/languages' );
-
-	// Add default posts and comments RSS feed links to head.
-	add_theme_support( 'automatic-feed-links' );
-
-	/*
-	 * Let WordPress manage the document title.
-	 * By adding theme support, we declare that this theme does not use a
-	 * hard-coded <title> tag in the document head, and expect WordPress to
-	 * provide it for us.
+	/**
+	 * 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.
 	 */
 	 */
-	add_theme_support( 'title-tag' );
 
 
-	// Add support for responsive embeds.
-	add_theme_support( 'responsive-embeds' );
-
-	// Add custom colors to Gutenberg
-	add_theme_support(
-		'editor-color-palette', array(
-			array(
-				'name'  => esc_html__( 'Black', 'rebalance' ),
-				'slug' => 'black',
-				'color' => '#000000',
-			),
+	function rebalance_setup() {
+		/*
+		 * Make theme available for translation.
+		 * Translations can be filed in the /languages/ directory.
+		 * If you're building a theme based on rebalance, use a find and replace
+		 * to change 'rebalance' to the name of your theme in all the template files.
+		 */
+		load_theme_textdomain( 'rebalance', get_template_directory() . '/languages' );
+
+		// Add default posts and comments RSS feed links to head.
+		add_theme_support( 'automatic-feed-links' );
+
+		/*
+		 * Let WordPress manage the document title.
+		 * By adding theme support, we declare that this theme does not use a
+		 * hard-coded <title> tag in the document head, and expect WordPress to
+		 * provide it for us.
+		 */
+		add_theme_support( 'title-tag' );
+
+		// Add support for responsive embeds.
+		add_theme_support( 'responsive-embeds' );
+
+		// Add custom colors to Gutenberg
+		add_theme_support(
+			'editor-color-palette',
 			array(
 			array(
-				'name'  => esc_html__( 'Dark Gray', 'rebalance' ),
-				'slug' => 'dark-gray',
-				'color' => '#666666',
-			),
-			array(
-				'name'  => esc_html__( 'Medium Gray', 'rebalance' ),
-				'slug' => 'medium-gray',
-				'color' => '#999999',
-			),
-			array(
-				'name'  => esc_html__( 'Light Gray', 'rebalance' ),
-				'slug' => 'light-gray',
-				'color' => '#cccccc',
-			),
+				array(
+					'name'  => esc_html__( 'Black', 'rebalance' ),
+					'slug'  => 'black',
+					'color' => '#000000',
+				),
+				array(
+					'name'  => esc_html__( 'Dark Gray', 'rebalance' ),
+					'slug'  => 'dark-gray',
+					'color' => '#666666',
+				),
+				array(
+					'name'  => esc_html__( 'Medium Gray', 'rebalance' ),
+					'slug'  => 'medium-gray',
+					'color' => '#999999',
+				),
+				array(
+					'name'  => esc_html__( 'Light Gray', 'rebalance' ),
+					'slug'  => 'light-gray',
+					'color' => '#cccccc',
+				),
+				array(
+					'name'  => esc_html__( 'White', 'rebalance' ),
+					'slug'  => 'white',
+					'color' => '#ffffff',
+				),
+				array(
+					'name'  => esc_html__( 'Red', 'rebalance' ),
+					'slug'  => 'red',
+					'color' => '#f35029',
+				),
+				array(
+					'name'  => esc_html__( 'Dark Red', 'rebalance' ),
+					'slug'  => 'dark-red',
+					'color' => '#aa2e11',
+				),
+			)
+		);
+
+		/**
+		 * Add support for core custom logo (replaces JetPack functionality)
+		 * - also see fallback in inc/jetpack.php
+		 */
+		add_theme_support(
+			'custom-logo',
 			array(
 			array(
-				'name'  => esc_html__( 'White', 'rebalance' ),
-				'slug' => 'white',
-				'color' => '#ffffff',
-			),
+				'height'      => 80,
+				'width'       => 80,
+				'flex-width'  => true,
+				'header-text' => array(
+					'site-title',
+					'site-description',
+				),
+			)
+		);
+
+		/*
+		 * 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' );
+		set_post_thumbnail_size( 720, 1200 );
+		add_image_size( 'rebalance-archive', 560, 9999 );
+
+		/*
+		 * This theme uses wp_nav_menu() in one location.
+		 */
+		register_nav_menus(
 			array(
 			array(
-				'name'  => esc_html__( 'Red', 'rebalance' ),
-				'slug' => 'red',
-				'color' => '#f35029',
-			),
+				'header' => esc_html__( 'Header Menu', 'rebalance' ),
+				'social' => esc_html__( 'Social Menu', 'rebalance' ),
+			)
+		);
+
+		/*
+		 * Switch default core markup for search form, comment form, and comments
+		 * to output valid HTML5.
+		 */
+		add_theme_support(
+			'html5',
 			array(
 			array(
-				'name'  => esc_html__( 'Dark Red', 'rebalance' ),
-				'slug' => 'dark-red',
-				'color' => '#aa2e11',
-			),
-		)
-	);
+				'search-form',
+				'comment-form',
+				'comment-list',
+				'gallery',
+				'caption',
+			)
+		);
 
 
-	/**
-	 * Add support for core custom logo (replaces JetPack functionality)
-	 * - also see fallback in inc/jetpack.php
-	 */
-	add_theme_support( 'custom-logo', array(
-		'height'      => 80,
-		'width'       => 80,
-		'flex-width'  => true,
-		'header-text' => array(
-			'site-title',
-			'site-description'
-		),
-	) );
-
-	/*
-	 * 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' );
-	set_post_thumbnail_size( 720, 1200 );
-	add_image_size( 'rebalance-archive', 560, 9999 );
+		/*
+		 * Enable support for Post Formats.
+		 * See https://developer.wordpress.org/themes/functionality/post-formats/
+		 */
+		add_theme_support(
+			'post-formats',
+			array(
+				'aside',
+				'image',
+				'video',
+				'quote',
+				'link',
+			)
+		);
 
 
-	/*
-	 * This theme uses wp_nav_menu() in one location.
-	 */
-	register_nav_menus( array(
-		'header' => esc_html__( 'Header Menu', 'rebalance' ),
-		'social'  => esc_html__( 'Social Menu', 'rebalance' )
-	) );
-
-	/*
-	 * 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',
-	) );
-
-	/*
-	 * Enable support for Post Formats.
-	 * See https://developer.wordpress.org/themes/functionality/post-formats/
-	 */
-	add_theme_support( 'post-formats', array(
-		'aside',
-		'image',
-		'video',
-		'quote',
-		'link',
-	) );
-
-	// Set up the WordPress core custom background feature.
-	add_theme_support( 'custom-background', apply_filters( 'rebalance_custom_background_args', array(
-		'default-color' => 'ffffff',
-		'default-image' => '',
-	) ) );
-}
+		// Set up the WordPress core custom background feature.
+		add_theme_support(
+			'custom-background',
+			apply_filters(
+				'rebalance_custom_background_args',
+				array(
+					'default-color' => 'ffffff',
+					'default-image' => '',
+				)
+			)
+		);
+	}
 endif; // rebalance_setup
 endif; // rebalance_setup
 add_action( 'after_setup_theme', 'rebalance_setup' );
 add_action( 'after_setup_theme', 'rebalance_setup' );
 
 
@@ -161,15 +180,17 @@ add_action( 'after_setup_theme', 'rebalance_content_width', 0 );
  * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
  * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
  */
  */
 function rebalance_widgets_init() {
 function rebalance_widgets_init() {
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer', 'rebalance' ),
-		'id'            => 'sidebar-1',
-		'description'   => '',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer', 'rebalance' ),
+			'id'            => 'sidebar-1',
+			'description'   => '',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
 }
 }
 add_action( 'widgets_init', 'rebalance_widgets_init' );
 add_action( 'widgets_init', 'rebalance_widgets_init' );
 
 
@@ -241,9 +262,13 @@ function rebalance_scripts() {
 	wp_enqueue_script( 'rebalance-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151112', true );
 	wp_enqueue_script( 'rebalance-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151112', true );
 
 
 	wp_enqueue_script( 'rebalance-theme-scripts', get_template_directory_uri() . '/js/scripts.js', array( 'jquery', 'columnlist', 'masonry' ), '20151130', true );
 	wp_enqueue_script( 'rebalance-theme-scripts', get_template_directory_uri() . '/js/scripts.js', array( 'jquery', 'columnlist', 'masonry' ), '20151130', true );
-	wp_localize_script( 'rebalance-theme-scripts', 'Rebalance', array(
-		'is_rtl' => ( 'rtl' == get_option( 'text_direction' ) ) ? 1 : 0,
-	) );
+	wp_localize_script(
+		'rebalance-theme-scripts',
+		'Rebalance',
+		array(
+			'is_rtl' => ( 'rtl' == get_option( 'text_direction' ) ) ? 1 : 0,
+		)
+	);
 
 
 	wp_enqueue_script( 'rebalance-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151112', true );
 	wp_enqueue_script( 'rebalance-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151112', true );
 
 
@@ -251,10 +276,14 @@ function rebalance_scripts() {
 		wp_enqueue_script( 'comment-reply' );
 		wp_enqueue_script( 'comment-reply' );
 	}
 	}
 
 
-	wp_localize_script( 'rebalance-navigation', 'rebalanceScreenReaderText', array(
-		'expand'   => esc_html__( 'expand child menu', 'rebalance' ),
-		'collapse' => esc_html__( 'collapse child menu', 'rebalance' ),
-	) );
+	wp_localize_script(
+		'rebalance-navigation',
+		'rebalanceScreenReaderText',
+		array(
+			'expand'   => esc_html__( 'expand child menu', 'rebalance' ),
+			'collapse' => esc_html__( 'collapse child menu', 'rebalance' ),
+		)
+	);
 }
 }
 add_action( 'wp_enqueue_scripts', 'rebalance_scripts' );
 add_action( 'wp_enqueue_scripts', 'rebalance_scripts' );
 
 
@@ -262,7 +291,7 @@ add_action( 'wp_enqueue_scripts', 'rebalance_scripts' );
  * Gutenberg Editor Styles
  * Gutenberg Editor Styles
  */
  */
 function rebalance_editor_styles() {
 function rebalance_editor_styles() {
-	wp_enqueue_style( 'rebalance-editor-block-style', get_template_directory_uri() . '/editor-blocks.css');
+	wp_enqueue_style( 'rebalance-editor-block-style', get_template_directory_uri() . '/editor-blocks.css' );
 	wp_enqueue_style( 'rebalance-fonts', rebalance_fonts_url(), array(), null );
 	wp_enqueue_style( 'rebalance-fonts', rebalance_fonts_url(), array(), null );
 }
 }
 add_action( 'enqueue_block_editor_assets', 'rebalance_editor_styles' );
 add_action( 'enqueue_block_editor_assets', 'rebalance_editor_styles' );
@@ -270,8 +299,8 @@ add_action( 'enqueue_block_editor_assets', 'rebalance_editor_styles' );
 /**
 /**
  * Check whether the browser supports JavaScript
  * Check whether the browser supports JavaScript
  */
  */
-function rebalance_html_js_class () {
-	echo '<script>document.documentElement.className = document.documentElement.className.replace("no-js","js");</script>'. "\n";
+function rebalance_html_js_class() {
+	echo '<script>document.documentElement.className = document.documentElement.className.replace("no-js","js");</script>' . "\n";
 }
 }
 add_action( 'wp_head', 'rebalance_html_js_class', 1 );
 add_action( 'wp_head', 'rebalance_html_js_class', 1 );
 
 

+ 0 - 1
redhill/functions.php

@@ -17,7 +17,6 @@ if ( ! function_exists( 'redhill_theme_setup' ) ) :
 	 * as indicating support for post thumbnails.
 	 * as indicating support for post thumbnails.
 	 */
 	 */
 	function redhill_theme_setup() {
 	function redhill_theme_setup() {
-
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		add_editor_style( 'style-editor.css' );
 		add_editor_style( 'style-editor.css' );
 
 

+ 0 - 1
rivington/functions.php

@@ -18,7 +18,6 @@ if ( ! function_exists( 'rivington_setup' ) ) :
 	 * as indicating support for post thumbnails.
 	 * as indicating support for post thumbnails.
 	 */
 	 */
 	function rivington_setup() {
 	function rivington_setup() {
-
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		add_editor_style( 'style-editor.css' );
 		add_editor_style( 'style-editor.css' );
 
 

+ 1 - 2
rockfield/functions.php

@@ -30,7 +30,6 @@ if ( ! function_exists( 'rockfield_setup' ) ) :
 	 * as indicating support for post thumbnails.
 	 * as indicating support for post thumbnails.
 	 */
 	 */
 	function rockfield_setup() {
 	function rockfield_setup() {
-
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		add_editor_style( 'style-editor.css' );
 		add_editor_style( 'style-editor.css' );
 
 
@@ -132,7 +131,7 @@ function rockfield_scripts() {
 	wp_dequeue_style( 'varia-style' );
 	wp_dequeue_style( 'varia-style' );
 
 
 	// enqueue child styles
 	// enqueue child styles
-	wp_enqueue_style('rockfield-style', get_stylesheet_uri(), array(), wp_get_theme()->get( 'Version' ));
+	wp_enqueue_style( 'rockfield-style', get_stylesheet_uri(), array(), wp_get_theme()->get( 'Version' ) );
 
 
 	// enqueue child RTL styles
 	// enqueue child RTL styles
 	wp_style_add_data( 'rockfield-style', 'rtl', 'replace' );
 	wp_style_add_data( 'rockfield-style', 'rtl', 'replace' );

+ 160 - 140
scratchpad/functions.php

@@ -8,134 +8,150 @@
  */
  */
 
 
 if ( ! function_exists( 'scratchpad_setup' ) ) :
 if ( ! function_exists( 'scratchpad_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 scratchpad_setup() {
-	/*
-	 * Make theme available for translation.
-	 * Translations can be filed in the /languages/ directory.
-	 * If you're building a theme based on Scratchpad, use a find and replace
-	 * to change 'scratchpad' to the name of your theme in all the template files.
-	 */
-	load_theme_textdomain( 'scratchpad', get_template_directory() . '/languages' );
-
-	// Add default posts and comments RSS feed links to head.
-	add_theme_support( 'automatic-feed-links' );
-
-	/*
-	 * Let WordPress manage the document title.
-	 * By adding theme support, we declare that this theme does not use a
-	 * hard-coded <title> tag in the document head, and expect WordPress to
-	 * provide it for us.
+	/**
+	 * 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.
 	 */
 	 */
-	add_theme_support( 'title-tag' );
 
 
-	// Add support for responsive embeds.
-	add_theme_support( 'responsive-embeds' );
-
- 	// Add custom colors to Gutenberg
-	add_theme_support(
-		'editor-color-palette', array(
-			array(
-				'name'  => esc_html__( 'Black', 'scratchpad' ),
-				'slug' => 'black',
-				'color' => '#222222',
-			),
+	function scratchpad_setup() {
+		/*
+		 * Make theme available for translation.
+		 * Translations can be filed in the /languages/ directory.
+		 * If you're building a theme based on Scratchpad, use a find and replace
+		 * to change 'scratchpad' to the name of your theme in all the template files.
+		 */
+		load_theme_textdomain( 'scratchpad', get_template_directory() . '/languages' );
+
+		// Add default posts and comments RSS feed links to head.
+		add_theme_support( 'automatic-feed-links' );
+
+		/*
+		 * Let WordPress manage the document title.
+		 * By adding theme support, we declare that this theme does not use a
+		 * hard-coded <title> tag in the document head, and expect WordPress to
+		 * provide it for us.
+		 */
+		add_theme_support( 'title-tag' );
+
+		// Add support for responsive embeds.
+		add_theme_support( 'responsive-embeds' );
+
+		// Add custom colors to Gutenberg
+		add_theme_support(
+			'editor-color-palette',
 			array(
 			array(
-				'name'  => esc_html__( 'Dark Gray', 'scratchpad' ),
-				'slug' => 'dark-gray',
-				'color' => '#777777',
-			),
-			array(
-				'name'  => esc_html__( 'Medium Gray', 'scratchpad' ),
-				'slug' => 'medium-gray',
-				'color' => '#999999',
-			),
-			array(
-				'name'  => esc_html__( 'Light Gray', 'scratchpad' ),
-				'slug' => 'light-gray',
-				'color' => '#bdcbcc',
-			),
-			array(
-				'name'  => esc_html__( 'White', 'scratchpad' ),
-				'slug' => 'white',
-				'color' => '#ffffff',
-			),
-			array(
-				'name'  => esc_html__( 'Blue', 'scratchpad' ),
-				'slug' => 'blue',
-				'color' => '#7ba6a9',
-			),
+				array(
+					'name'  => esc_html__( 'Black', 'scratchpad' ),
+					'slug'  => 'black',
+					'color' => '#222222',
+				),
+				array(
+					'name'  => esc_html__( 'Dark Gray', 'scratchpad' ),
+					'slug'  => 'dark-gray',
+					'color' => '#777777',
+				),
+				array(
+					'name'  => esc_html__( 'Medium Gray', 'scratchpad' ),
+					'slug'  => 'medium-gray',
+					'color' => '#999999',
+				),
+				array(
+					'name'  => esc_html__( 'Light Gray', 'scratchpad' ),
+					'slug'  => 'light-gray',
+					'color' => '#bdcbcc',
+				),
+				array(
+					'name'  => esc_html__( 'White', 'scratchpad' ),
+					'slug'  => 'white',
+					'color' => '#ffffff',
+				),
+				array(
+					'name'  => esc_html__( 'Blue', 'scratchpad' ),
+					'slug'  => 'blue',
+					'color' => '#7ba6a9',
+				),
+				array(
+					'name'  => esc_html__( 'Dark Blue', 'scratchpad' ),
+					'slug'  => 'dark-blue',
+					'color' => '#537375',
+				),
+				array(
+					'name'  => esc_html__( 'Orange', 'scratchpad' ),
+					'slug'  => 'orange',
+					'color' => '#d16221',
+				),
+				array(
+					'name'  => esc_html__( 'Yellow', 'scratchpad' ),
+					'slug'  => 'yellow',
+					'color' => '#e4b500',
+				),
+			)
+		);
+
+		/*
+		 * Enable support for Post Thumbnails on posts and pages.
+		 *
+		 * @link https://developer.wordpress.org/themes/functionality/featuBlue-images-post-thumbnails/
+		 */
+		add_theme_support( 'post-thumbnails' );
+		add_image_size( 'scratchpad-avatar', 85, 85, true );
+		add_image_size( 'scratchpad-featuBlue', 1000, 9999 );
+
+		// This theme uses wp_nav_menu() in one location.
+		register_nav_menus(
 			array(
 			array(
-				'name'  => esc_html__( 'Dark Blue', 'scratchpad' ),
-				'slug' => 'dark-blue',
-				'color' => '#537375',
-			),
+				'primary' => esc_html__( 'Header Menu', 'scratchpad' ),
+			)
+		);
+
+		/*
+		 * Switch default core markup for search form, comment form, and comments
+		 * to output valid HTML5.
+		 */
+		add_theme_support(
+			'html5',
 			array(
 			array(
-				'name'  => esc_html__( 'Orange', 'scratchpad' ),
-				'slug' => 'orange',
-				'color' => '#d16221',
-			),
+				'search-form',
+				'comment-form',
+				'comment-list',
+				'gallery',
+				'caption',
+			)
+		);
+
+		/*
+		 * Enable support for Post Formats.
+		 * See https://developer.wordpress.org/themes/functionality/post-formats/
+		 */
+		add_theme_support(
+			'post-formats',
 			array(
 			array(
-				'name'  => esc_html__( 'Yellow', 'scratchpad' ),
-				'slug' => 'yellow',
-				'color' => '#e4b500',
-			),	
-		)
-	);
+				'aside',
+				'audio',
+				'gallery',
+				'image',
+				'link',
+				'quote',
+				'status',
+				'video',
+			)
+		);
 
 
-	/*
-	 * Enable support for Post Thumbnails on posts and pages.
-	 *
-	 * @link https://developer.wordpress.org/themes/functionality/featuBlue-images-post-thumbnails/
-	 */
-	add_theme_support( 'post-thumbnails' );
-	add_image_size( 'scratchpad-avatar', 85, 85, true );
-	add_image_size( 'scratchpad-featuBlue', 1000, 9999 );
-
-	// This theme uses wp_nav_menu() in one location.
-	register_nav_menus( array(
-		'primary' => esc_html__( 'Header Menu', 'scratchpad' ),
-	) );
-
-	/*
-	 * 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',
-	) );
-
-	/*
-	 * Enable support for Post Formats.
-	 * See https://developer.wordpress.org/themes/functionality/post-formats/
-	 */
-	add_theme_support( 'post-formats', array(
-		'aside',
-		'audio',
-		'gallery',
-		'image',
-		'link',
-		'quote',
-		'status',
-		'video',
-	) );
-
-	// Set up the WordPress core custom background feature.
-	add_theme_support( 'custom-background', apply_filters( 'scratchpad_custom_background_args', array(
-		'default-color' => 'bdcbcc',
-		'default-image' => '',
-	) ) );
-}
+		// Set up the WordPress core custom background feature.
+		add_theme_support(
+			'custom-background',
+			apply_filters(
+				'scratchpad_custom_background_args',
+				array(
+					'default-color' => 'bdcbcc',
+					'default-image' => '',
+				)
+			)
+		);
+	}
 endif;
 endif;
 add_action( 'after_setup_theme', 'scratchpad_setup' );
 add_action( 'after_setup_theme', 'scratchpad_setup' );
 
 
@@ -157,25 +173,29 @@ add_action( 'after_setup_theme', 'scratchpad_content_width', 0 );
  * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
  * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
  */
  */
 function scratchpad_widgets_init() {
 function scratchpad_widgets_init() {
-	register_sidebar( array(
-		'name'          => esc_html__( 'Sidebar', 'scratchpad' ),
-		'id'            => 'sidebar-1',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer', 'scratchpad' ),
-		'id'            => 'sidebar-2',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Sidebar', 'scratchpad' ),
+			'id'            => 'sidebar-1',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer', 'scratchpad' ),
+			'id'            => 'sidebar-2',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
 }
 }
 add_action( 'widgets_init', 'scratchpad_widgets_init' );
 add_action( 'widgets_init', 'scratchpad_widgets_init' );
 
 

+ 1 - 1
seedlet-blocks/functions.php

@@ -33,4 +33,4 @@ add_action( 'after_setup_theme', 'seedlet_blocks_setup', 11 );
 function seedlet_blocks_enqueue() {
 function seedlet_blocks_enqueue() {
 	wp_enqueue_style( 'seedlet-blocks-styles', get_stylesheet_uri() );
 	wp_enqueue_style( 'seedlet-blocks-styles', get_stylesheet_uri() );
 }
 }
-add_action( 'wp_enqueue_scripts', 'seedlet_blocks_enqueue', 11 );
+add_action( 'wp_enqueue_scripts', 'seedlet_blocks_enqueue', 11 );

+ 1 - 0
seedlet/functions.php

@@ -24,6 +24,7 @@ if ( ! function_exists( 'seedlet_setup' ) ) :
 	 * runs before the init hook. The init hook is too late for some features, such
 	 * runs before the init hook. The init hook is too late for some features, such
 	 * as indicating support for post thumbnails.
 	 * as indicating support for post thumbnails.
 	 */
 	 */
+
 	function seedlet_setup() {
 	function seedlet_setup() {
 		/*
 		/*
 		 * Make theme available for translation.
 		 * Make theme available for translation.

+ 0 - 1
shawburn/functions.php

@@ -30,7 +30,6 @@ if ( ! function_exists( 'shawburn_setup' ) ) :
 	 * as indicating support for post thumbnails.
 	 * as indicating support for post thumbnails.
 	 */
 	 */
 	function shawburn_setup() {
 	function shawburn_setup() {
-
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		add_editor_style( 'style-editor.css' );
 		add_editor_style( 'style-editor.css' );
 
 

+ 209 - 174
shoreditch/functions.php

@@ -8,112 +8,130 @@
  */
  */
 
 
 if ( ! function_exists( 'shoreditch_setup' ) ) :
 if ( ! function_exists( 'shoreditch_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 shoreditch_setup() {
-	/*
-	 * Make theme available for translation.
-	 * Translations can be filed in the /languages/ directory.
-	 * If you're building a theme based on Shoreditch, use a find and replace
-	 * to change 'shoreditch' to the name of your theme in all the template files.
-	 */
-	load_theme_textdomain( 'shoreditch', get_template_directory() . '/languages' );
-
-	// Add default posts and comments RSS feed links to head.
-	add_theme_support( 'automatic-feed-links' );
-
-	/*
-	 * Let WordPress manage the document title.
-	 * By adding theme support, we declare that this theme does not use a
-	 * hard-coded <title> 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' );
-	set_post_thumbnail_size( 2000, 1500, true );
-
-	// Enable support for custom logo.
-	add_theme_support( 'custom-logo', array(
-		'height'      => 480,
-		'width'       => 480,
-		'flex-height' => true,
-	) );
-
-	// This theme uses wp_nav_menu() in one location.
-	register_nav_menus( array(
-		'primary' => esc_html__( 'Primary', 'shoreditch' ),
-	) );
-
-	/*
-	 * 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',
-	) );
-
-	// Set up the WordPress core custom background feature.
-	add_theme_support( 'custom-background', apply_filters( 'shoreditch_custom_background_args', array(
-		'default-color'    => 'ffffff',
-		'default-image'    => '',
-	) ) );
 
 
 	/**
 	/**
-	 * Add support for Eventbrite.
-	 * See: https://wordpress.org/plugins/eventbrite-api/
+	 * 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.
 	 */
 	 */
-	add_theme_support( 'eventbrite' );
-
-	// Add support for responsive embeds.
-	add_theme_support( 'responsive-embeds' );
-
-	// Add support for full and wide align images.
-	add_theme_support( 'align-wide' );
-
-	// Add support for custom color scheme.
-	add_theme_support( 'editor-color-palette', array(
-		array(
-			'name'  => esc_html__( 'Blue', 'shoreditch' ),
-			'slug'  => 'blue',
-			'color' => '#3e69dc',
-		),
-		array(
-			'name'  => esc_html__( 'Dark Gray', 'shoreditch' ),
-			'slug'  => 'dark-gray',
-			'color' => '#2c313f',
-		),
-		array(
-			'name'  => esc_html__( 'Medium Gray', 'shoreditch' ),
-			'slug'  => 'medium-gray',
-			'color' => '#73757D',
-		),
-		array(
-			'name'  => esc_html__( 'Light Gray', 'shoreditch' ),
-			'slug'  => 'light-gray',
-			'color' => '#f3f3f3',
-		),
-		array(
-			'name'  => esc_html__( 'White', 'shoreditch' ),
-			'slug'  => 'white',
-			'color' => '#fff',
-		),
-	) );
-}
+	function shoreditch_setup() {
+		/*
+		 * Make theme available for translation.
+		 * Translations can be filed in the /languages/ directory.
+		 * If you're building a theme based on Shoreditch, use a find and replace
+		 * to change 'shoreditch' to the name of your theme in all the template files.
+		 */
+		load_theme_textdomain( 'shoreditch', get_template_directory() . '/languages' );
+
+		// Add default posts and comments RSS feed links to head.
+		add_theme_support( 'automatic-feed-links' );
+
+		/*
+		 * Let WordPress manage the document title.
+		 * By adding theme support, we declare that this theme does not use a
+		 * hard-coded <title> 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' );
+		set_post_thumbnail_size( 2000, 1500, true );
+
+		// Enable support for custom logo.
+		add_theme_support(
+			'custom-logo',
+			array(
+				'height'      => 480,
+				'width'       => 480,
+				'flex-height' => true,
+			)
+		);
+
+		// This theme uses wp_nav_menu() in one location.
+		register_nav_menus(
+			array(
+				'primary' => esc_html__( 'Primary', 'shoreditch' ),
+			)
+		);
+
+		/*
+		 * 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',
+			)
+		);
+
+		// Set up the WordPress core custom background feature.
+		add_theme_support(
+			'custom-background',
+			apply_filters(
+				'shoreditch_custom_background_args',
+				array(
+					'default-color' => 'ffffff',
+					'default-image' => '',
+				)
+			)
+		);
+
+		/**
+		 * Add support for Eventbrite.
+		 * See: https://wordpress.org/plugins/eventbrite-api/
+		 */
+		add_theme_support( 'eventbrite' );
+
+		// Add support for responsive embeds.
+		add_theme_support( 'responsive-embeds' );
+
+		// Add support for full and wide align images.
+		add_theme_support( 'align-wide' );
+
+		// Add support for custom color scheme.
+		add_theme_support(
+			'editor-color-palette',
+			array(
+				array(
+					'name'  => esc_html__( 'Blue', 'shoreditch' ),
+					'slug'  => 'blue',
+					'color' => '#3e69dc',
+				),
+				array(
+					'name'  => esc_html__( 'Dark Gray', 'shoreditch' ),
+					'slug'  => 'dark-gray',
+					'color' => '#2c313f',
+				),
+				array(
+					'name'  => esc_html__( 'Medium Gray', 'shoreditch' ),
+					'slug'  => 'medium-gray',
+					'color' => '#73757D',
+				),
+				array(
+					'name'  => esc_html__( 'Light Gray', 'shoreditch' ),
+					'slug'  => 'light-gray',
+					'color' => '#f3f3f3',
+				),
+				array(
+					'name'  => esc_html__( 'White', 'shoreditch' ),
+					'slug'  => 'white',
+					'color' => '#fff',
+				),
+			)
+		);
+	}
 endif;
 endif;
 add_action( 'after_setup_theme', 'shoreditch_setup' );
 add_action( 'after_setup_theme', 'shoreditch_setup' );
 
 
@@ -135,75 +153,84 @@ add_action( 'after_setup_theme', 'shoreditch_content_width', 0 );
  * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
  * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
  */
  */
 function shoreditch_widgets_init() {
 function shoreditch_widgets_init() {
-	register_sidebar( array(
-		'name'          => esc_html__( 'Sidebar', 'shoreditch' ),
-		'id'            => 'sidebar-1',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget widget-small %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Top Footer', 'shoreditch' ),
-		'id'            => 'sidebar-2',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Bottom Footer', 'shoreditch' ),
-		'id'            => 'sidebar-3',
-		'description'   => '',
-		'before_widget' => '<section id="%1$s" class="widget widget-small %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Sidebar', 'shoreditch' ),
+			'id'            => 'sidebar-1',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget widget-small %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Top Footer', 'shoreditch' ),
+			'id'            => 'sidebar-2',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Bottom Footer', 'shoreditch' ),
+			'id'            => 'sidebar-3',
+			'description'   => '',
+			'before_widget' => '<section id="%1$s" class="widget widget-small %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
 }
 }
 add_action( 'widgets_init', 'shoreditch_widgets_init' );
 add_action( 'widgets_init', 'shoreditch_widgets_init' );
 
 
 if ( ! function_exists( 'shoreditch_fonts_url' ) ) :
 if ( ! function_exists( 'shoreditch_fonts_url' ) ) :
-/**
- * Register Google fonts for Shoreditch.
- *
- * Create your own shoreditch_fonts_url() function to override in a child theme.
- *
- * @return string Google fonts URL for the theme.
- */
-function shoreditch_fonts_url() {
-	$fonts_url = '';
-	$fonts     = array();
-	$subsets   = 'latin,latin-ext';
-
-	/* translators: If there are characters in your language that are not supported by Poppins, translate this to 'off'. Do not translate into your own language. */
-	if ( 'off' !== esc_html_x( 'on', 'Poppins font: on or off', 'shoreditch' ) ) {
-		$fonts[] = 'Poppins:400,700';
-	}
-
-	/* translators: If there are characters in your language that are not supported by Lato, translate this to 'off'. Do not translate into your own language. */
-	if ( 'off' !== esc_html_x( 'on', 'Lato font: on or off', 'shoreditch' ) ) {
-		$fonts[] = 'Lato:400,700,400italic,700italic';
-	}
-
-	/* translators: If there are characters in your language that are not supported by Inconsolata, translate this to 'off'. Do not translate into your own language. */
-	if ( 'off' !== esc_html_x( 'on', 'Inconsolata font: on or off', 'shoreditch' ) ) {
-		$fonts[] = 'Inconsolata:400,700';
-	}
-
-	if ( $fonts ) {
-		$fonts_url = add_query_arg( array(
-			'family' => urlencode( implode( '|', $fonts ) ),
-			'subset' => urlencode( $subsets ),
-		), 'https://fonts.googleapis.com/css' );
+	/**
+	 * Register Google fonts for Shoreditch.
+	 *
+	 * Create your own shoreditch_fonts_url() function to override in a child theme.
+	 *
+	 * @return string Google fonts URL for the theme.
+	 */
+	function shoreditch_fonts_url() {
+		$fonts_url = '';
+		$fonts     = array();
+		$subsets   = 'latin,latin-ext';
+
+		/* translators: If there are characters in your language that are not supported by Poppins, translate this to 'off'. Do not translate into your own language. */
+		if ( 'off' !== esc_html_x( 'on', 'Poppins font: on or off', 'shoreditch' ) ) {
+			$fonts[] = 'Poppins:400,700';
+		}
+
+		/* translators: If there are characters in your language that are not supported by Lato, translate this to 'off'. Do not translate into your own language. */
+		if ( 'off' !== esc_html_x( 'on', 'Lato font: on or off', 'shoreditch' ) ) {
+			$fonts[] = 'Lato:400,700,400italic,700italic';
+		}
+
+		/* translators: If there are characters in your language that are not supported by Inconsolata, translate this to 'off'. Do not translate into your own language. */
+		if ( 'off' !== esc_html_x( 'on', 'Inconsolata font: on or off', 'shoreditch' ) ) {
+			$fonts[] = 'Inconsolata:400,700';
+		}
+
+		if ( $fonts ) {
+			$fonts_url = add_query_arg(
+				array(
+					'family' => urlencode( implode( '|', $fonts ) ),
+					'subset' => urlencode( $subsets ),
+				),
+				'https://fonts.googleapis.com/css'
+			);
+		}
+
+		return $fonts_url;
 	}
 	}
-
-	return $fonts_url;
-}
 endif;
 endif;
 
 
 /**
 /**
@@ -233,14 +260,22 @@ function shoreditch_scripts() {
 		wp_enqueue_script( 'comment-reply' );
 		wp_enqueue_script( 'comment-reply' );
 	}
 	}
 
 
-	wp_localize_script( 'shoreditch-back-top', 'shoreditchButtonTitle', array(
-		'desc' => esc_html__( 'Back to top', 'shoreditch' ),
-	) );
+	wp_localize_script(
+		'shoreditch-back-top',
+		'shoreditchButtonTitle',
+		array(
+			'desc' => esc_html__( 'Back to top', 'shoreditch' ),
+		)
+	);
 
 
-	wp_localize_script( 'shoreditch-navigation', 'shoreditchScreenReaderText', array(
-		'expand'   => esc_html__( 'expand child menu', 'shoreditch' ),
-		'collapse' => esc_html__( 'collapse child menu', 'shoreditch' ),
-	) );
+	wp_localize_script(
+		'shoreditch-navigation',
+		'shoreditchScreenReaderText',
+		array(
+			'expand'   => esc_html__( 'expand child menu', 'shoreditch' ),
+			'collapse' => esc_html__( 'collapse child menu', 'shoreditch' ),
+		)
+	);
 }
 }
 add_action( 'wp_enqueue_scripts', 'shoreditch_scripts' );
 add_action( 'wp_enqueue_scripts', 'shoreditch_scripts' );
 
 

+ 143 - 117
sketch/functions.php

@@ -15,7 +15,6 @@ if ( ! isset( $content_width ) ) {
 if ( ! function_exists( 'sketch_content_width' ) ) :
 if ( ! function_exists( 'sketch_content_width' ) ) :
 
 
 	function sketch_content_width() {
 	function sketch_content_width() {
-
 		global $content_width;
 		global $content_width;
 
 
 		if ( is_page_template( 'fullwidth-page.php' ) || ! is_active_sidebar( 'sidebar-1' ) ) {
 		if ( is_page_template( 'fullwidth-page.php' ) || ! is_active_sidebar( 'sidebar-1' ) ) {
@@ -27,114 +26,139 @@ endif;
 add_action( 'template_redirect', 'sketch_content_width' );
 add_action( 'template_redirect', 'sketch_content_width' );
 
 
 if ( ! function_exists( 'sketch_setup' ) ) :
 if ( ! function_exists( 'sketch_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 sketch_setup() {
-
-	/*
-	 * Make theme available for translation.
-	 * Translations can be filed in the /languages/ directory.
-	 * If you're building a theme based on Sketch, use a find and replace
-	 * to change 'sketch' to the name of your theme in all the template files
-	 */
-	load_theme_textdomain( 'sketch', get_template_directory() . '/languages' );
-
-	// Add default posts and comments RSS feed links to head.
-	add_theme_support( 'automatic-feed-links' );
-
-	/*
-	 * Let WordPress manage the document title.
-	 * By adding theme support, we declare that this theme does not use a
-	 * hard-coded <title> 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.
+	/**
+	 * Sets up theme defaults and registers support for various WordPress features.
 	 *
 	 *
-	 * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
-	 */
-	add_theme_support( 'post-thumbnails' );
-
-	add_image_size( 'sketch-landscape', '800', '600', true );
-	add_image_size( 'sketch-portrait', '800', '1067', true );
-	add_image_size( 'sketch-square', '800', '800', true );
-
-	add_image_size( 'sketch-featured', '1092', '400', true );
-	add_image_size( 'sketch-site-logo', '300', '300' );
-
-	// This theme uses wp_nav_menu() in one location.
-	register_nav_menus( array(
-		'primary' => __( 'Primary Menu', 'sketch' ),
-		'social'  => __( 'Social Links', 'sketch' ),
-	) );
-
-	/*
-	 * 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'
-	) );
-
-	/*
-	 * Enable support for Post Formats.
-	 * See http://codex.wordpress.org/Post_Formats
+	 * 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.
 	 */
 	 */
-	add_theme_support( 'post-formats', array(
-		'aside', 'image', 'video', 'quote', 'link'
-	) );
+	function sketch_setup() {
+
+		/*
+		 * Make theme available for translation.
+		 * Translations can be filed in the /languages/ directory.
+		 * If you're building a theme based on Sketch, use a find and replace
+		 * to change 'sketch' to the name of your theme in all the template files
+		 */
+		load_theme_textdomain( 'sketch', get_template_directory() . '/languages' );
+
+		// Add default posts and comments RSS feed links to head.
+		add_theme_support( 'automatic-feed-links' );
+
+		/*
+		 * Let WordPress manage the document title.
+		 * By adding theme support, we declare that this theme does not use a
+		 * hard-coded <title> 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 http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
+		 */
+		add_theme_support( 'post-thumbnails' );
+
+		add_image_size( 'sketch-landscape', '800', '600', true );
+		add_image_size( 'sketch-portrait', '800', '1067', true );
+		add_image_size( 'sketch-square', '800', '800', true );
+
+		add_image_size( 'sketch-featured', '1092', '400', true );
+		add_image_size( 'sketch-site-logo', '300', '300' );
+
+		// This theme uses wp_nav_menu() in one location.
+		register_nav_menus(
+			array(
+				'primary' => __( 'Primary Menu', 'sketch' ),
+				'social'  => __( 'Social Links', 'sketch' ),
+			)
+		);
 
 
-	// Set up the WordPress core custom background feature.
-	add_theme_support( 'custom-background', apply_filters( 'sketch_custom_background_args', array(
-		'default-color' => 'eeeeee',
-		'default-image' => '',
-	) ) );
+		/*
+		 * 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 support for Eventbrite.
-	 * See: https://wordpress.org/plugins/eventbrite-api/
-	 */
-	add_theme_support( 'eventbrite' );
+		/*
+		 * Enable support for Post Formats.
+		 * See http://codex.wordpress.org/Post_Formats
+		 */
+		add_theme_support(
+			'post-formats',
+			array(
+				'aside',
+				'image',
+				'video',
+				'quote',
+				'link',
+			)
+		);
 
 
-		// Add support for responsive embeds.
-	add_theme_support( 'responsive-embeds' );
+		// Set up the WordPress core custom background feature.
+		add_theme_support(
+			'custom-background',
+			apply_filters(
+				'sketch_custom_background_args',
+				array(
+					'default-color' => 'eeeeee',
+					'default-image' => '',
+				)
+			)
+		);
 
 
-	// Add support for custom color scheme.
-	add_theme_support( 'editor-color-palette', array(
-		array(
-			'name'  => esc_html__( 'Orange', 'sketch' ),
-			'slug'  => 'orange',
-			'color' => '#f68060',
-		),
-		array(
-			'name'  => esc_html__( 'Dark Gray', 'sketch' ),
-			'slug'  => 'dark-gray',
-			'color' => '#333',
-		),
-		array(
-			'name'  => esc_html__( 'Medium Gray', 'sketch' ),
-			'slug'  => 'medium-gray',
-			'color' => '#999',
-		),
-		array(
-			'name'  => esc_html__( 'Light Gray', 'sketch' ),
-			'slug'  => 'light-gray',
-			'color' => '#eee',
-		),
-		array(
-			'name'  => esc_html__( 'White', 'sketch' ),
-			'slug'  => 'white',
-			'color' => '#fff',
-		),
-	) );
-}
+		/**
+		 * Add support for Eventbrite.
+		 * See: https://wordpress.org/plugins/eventbrite-api/
+		 */
+		add_theme_support( 'eventbrite' );
+
+			// Add support for responsive embeds.
+		add_theme_support( 'responsive-embeds' );
+
+		// Add support for custom color scheme.
+		add_theme_support(
+			'editor-color-palette',
+			array(
+				array(
+					'name'  => esc_html__( 'Orange', 'sketch' ),
+					'slug'  => 'orange',
+					'color' => '#f68060',
+				),
+				array(
+					'name'  => esc_html__( 'Dark Gray', 'sketch' ),
+					'slug'  => 'dark-gray',
+					'color' => '#333',
+				),
+				array(
+					'name'  => esc_html__( 'Medium Gray', 'sketch' ),
+					'slug'  => 'medium-gray',
+					'color' => '#999',
+				),
+				array(
+					'name'  => esc_html__( 'Light Gray', 'sketch' ),
+					'slug'  => 'light-gray',
+					'color' => '#eee',
+				),
+				array(
+					'name'  => esc_html__( 'White', 'sketch' ),
+					'slug'  => 'white',
+					'color' => '#fff',
+				),
+			)
+		);
+	}
 endif; // sketch_setup
 endif; // sketch_setup
 add_action( 'after_setup_theme', 'sketch_setup' );
 add_action( 'after_setup_theme', 'sketch_setup' );
 
 
@@ -144,15 +168,17 @@ add_action( 'after_setup_theme', 'sketch_setup' );
  * @link http://codex.wordpress.org/Function_Reference/register_sidebar
  * @link http://codex.wordpress.org/Function_Reference/register_sidebar
  */
  */
 function sketch_widgets_init() {
 function sketch_widgets_init() {
-	register_sidebar( array(
-		'name'          => __( 'Sidebar', 'sketch' ),
-		'id'            => 'sidebar-1',
-		'description'   => '',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h1 class="widget-title">',
-		'after_title'   => '</h1>',
-	) );
+	register_sidebar(
+		array(
+			'name'          => __( 'Sidebar', 'sketch' ),
+			'id'            => 'sidebar-1',
+			'description'   => '',
+			'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', 'sketch_widgets_init' );
 add_action( 'widgets_init', 'sketch_widgets_init' );
 
 
@@ -166,7 +192,6 @@ function sketch_scripts() {
 	// Block stylesheets
 	// Block stylesheets
 	wp_enqueue_style( 'sketch-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'sketch-style' ), '20181018' );
 	wp_enqueue_style( 'sketch-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'sketch-style' ), '20181018' );
 
 
-
 	wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.4.1' );
 	wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.4.1' );
 
 
 	if ( sketch_has_featured_posts( 2 ) && is_page_template( 'portfolio-page.php' ) ) {
 	if ( sketch_has_featured_posts( 2 ) && is_page_template( 'portfolio-page.php' ) ) {
@@ -204,16 +229,16 @@ add_action( 'enqueue_block_editor_assets', 'sketch_block_editor_styles' );
  * Register Google Fonts
  * Register Google Fonts
  */
  */
 function sketch_fonts_url() {
 function sketch_fonts_url() {
-    $fonts_url = '';
+	$fonts_url = '';
 
 
-    /* Translators: If there are characters in your language that are not
+	/* Translators: If there are characters in your language that are not
 	 * supported by Lato, translate this to 'off'. Do not translate
 	 * supported by Lato, translate this to 'off'. Do not translate
 	 * into your own language.
 	 * into your own language.
 	 */
 	 */
 	$lato = _x( 'on', 'Lato font: on or off', 'sketch' );
 	$lato = _x( 'on', 'Lato font: on or off', 'sketch' );
 
 
 	if ( 'off' !== $lato ) {
 	if ( 'off' !== $lato ) {
-		$font_families = array();
+		$font_families   = array();
 		$font_families[] = 'Lato:300,400,700,300italic,400italic,700italic';
 		$font_families[] = 'Lato:300,400,700,300italic,400italic,700italic';
 
 
 		$query_args = array(
 		$query_args = array(
@@ -252,8 +277,9 @@ function sketch_post_thumbnail_class() {
 		$thumbsize = 'sketch-landscape';
 		$thumbsize = 'sketch-landscape';
 	endif;
 	endif;
 
 
-	if ( ! has_post_thumbnail() )
+	if ( ! has_post_thumbnail() ) {
 		$thumbsize .= ' no-thumbnail';
 		$thumbsize .= ' no-thumbnail';
+	}
 
 
 	return $thumbsize;
 	return $thumbsize;
 }
 }

+ 54 - 55
sophisticated-business/functions.php

@@ -8,65 +8,65 @@
  */
  */
 
 
 if ( ! function_exists( 'sophisticated_business_setup' ) ) :
 if ( ! function_exists( 'sophisticated_business_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 sophisticated_business_setup() {
-	// Switches Gutenberg controls to work against a dark background.
-	add_theme_support( 'dark-editor-style' );
-
 	/**
 	/**
-	 * Add support for core custom logo.
+	 * Sets up theme defaults and registers support for various WordPress features.
 	 *
 	 *
-	 * @link https://codex.wordpress.org/Theme_Logo
+	 * 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.
 	 */
 	 */
-	add_theme_support(
-		'custom-logo',
-		array(
-			'height'      => 120,
-			'width'       => 190,
-			'flex-width'  => true,
-			'flex-height' => false,
-			'header-text' => array( 'site-title' ),
-		)
-	);
-
-	// Editor color palette.
-	add_theme_support(
-		'editor-color-palette',
-		array(
-			array(
-				'name'  => __( 'Primary', 'sophisticated-business' ),
-				'slug'  => 'primary',
-				'color' => '#caab57', // $color__link
-			),
-			array(
-				'name'  => __( 'Secondary', 'sophisticated-business' ),
-				'slug'  => 'secondary',
-				'color' => '#b59439', // $color__border-link-hover
-			),
-			array(
-				'name'  => __( 'Dark Gray', 'sophisticated-business' ),
-				'slug'  => 'dark-gray',
-				'color' => '#1c1c1c', // $color__text-screen
-			),
+	function sophisticated_business_setup() {
+		// Switches Gutenberg controls to work against a dark background.
+		add_theme_support( 'dark-editor-style' );
+
+		/**
+		 * Add support for core custom logo.
+		 *
+		 * @link https://codex.wordpress.org/Theme_Logo
+		 */
+		add_theme_support(
+			'custom-logo',
 			array(
 			array(
-				'name'  => __( 'Light Gray', 'sophisticated-business' ),
-				'slug'  => 'light-gray',
-				'color' => '#cccccc', // $color__text-light
-			),
+				'height'      => 120,
+				'width'       => 190,
+				'flex-width'  => true,
+				'flex-height' => false,
+				'header-text' => array( 'site-title' ),
+			)
+		);
+
+		// Editor color palette.
+		add_theme_support(
+			'editor-color-palette',
 			array(
 			array(
-				'name'  => __( 'White', 'sophisticated-business' ),
-				'slug'  => 'white',
-				'color' => '#ffffff',
-			),
-		)
-	);
-}
+				array(
+					'name'  => __( 'Primary', 'sophisticated-business' ),
+					'slug'  => 'primary',
+					'color' => '#caab57', // $color__link
+				),
+				array(
+					'name'  => __( 'Secondary', 'sophisticated-business' ),
+					'slug'  => 'secondary',
+					'color' => '#b59439', // $color__border-link-hover
+				),
+				array(
+					'name'  => __( 'Dark Gray', 'sophisticated-business' ),
+					'slug'  => 'dark-gray',
+					'color' => '#1c1c1c', // $color__text-screen
+				),
+				array(
+					'name'  => __( 'Light Gray', 'sophisticated-business' ),
+					'slug'  => 'light-gray',
+					'color' => '#cccccc', // $color__text-light
+				),
+				array(
+					'name'  => __( 'White', 'sophisticated-business' ),
+					'slug'  => 'white',
+					'color' => '#ffffff',
+				),
+			)
+		);
+	}
 endif; // sophisticated_business_setup
 endif; // sophisticated_business_setup
 add_action( 'after_setup_theme', 'sophisticated_business_setup', 30 );
 add_action( 'after_setup_theme', 'sophisticated_business_setup', 30 );
 
 
@@ -167,4 +167,3 @@ require get_stylesheet_directory() . '/inc/jetpack.php';
  * Customizer additions.
  * Customizer additions.
  */
  */
 require get_stylesheet_directory() . '/inc/customizer.php';
 require get_stylesheet_directory() . '/inc/customizer.php';
-

+ 1 - 2
spearhead/functions.php

@@ -18,7 +18,6 @@ if ( ! function_exists( 'spearhead_setup' ) ) :
 	 * as indicating support for post thumbnails.
 	 * as indicating support for post thumbnails.
 	 */
 	 */
 	function spearhead_setup() {
 	function spearhead_setup() {
-
 		// Add support for editor styles.
 		// Add support for editor styles.
 		add_theme_support( 'editor-styles' );
 		add_theme_support( 'editor-styles' );
 
 
@@ -136,7 +135,7 @@ function spearhead_scripts() {
 	wp_dequeue_style( 'seedlet-custom-color-overrides' );
 	wp_dequeue_style( 'seedlet-custom-color-overrides' );
 	wp_enqueue_style( 'spearhead-variables-style', get_stylesheet_directory_uri() . '/variables.css', array(), wp_get_theme()->get( 'Version' ) );
 	wp_enqueue_style( 'spearhead-variables-style', get_stylesheet_directory_uri() . '/variables.css', array(), wp_get_theme()->get( 'Version' ) );
 
 
-	if( false === get_theme_mod( 'color_darkmode_disable', false ) ) {
+	if ( false === get_theme_mod( 'color_darkmode_disable', false ) ) {
 		wp_enqueue_style( 'spearhead-variables-dark-style', get_stylesheet_directory_uri() . '/variables-dark.css', array(), wp_get_theme()->get( 'Version' ) );
 		wp_enqueue_style( 'spearhead-variables-dark-style', get_stylesheet_directory_uri() . '/variables-dark.css', array(), wp_get_theme()->get( 'Version' ) );
 	}
 	}
 
 

+ 4 - 5
stow/functions.php

@@ -30,7 +30,6 @@ if ( ! function_exists( 'stow_setup' ) ) :
 	 * as indicating support for post thumbnails.
 	 * as indicating support for post thumbnails.
 	 */
 	 */
 	function stow_setup() {
 	function stow_setup() {
-
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		add_editor_style( 'style-editor.css' );
 		add_editor_style( 'style-editor.css' );
 
 
@@ -96,7 +95,7 @@ function stow_fonts_url() {
 	/* translators: If there are characters in your language that are not supported
 	/* translators: If there are characters in your language that are not supported
 	 * by Source Sans Pro, translate this to 'off'. Do not translate into your own language.
 	 * by Source Sans Pro, translate this to 'off'. Do not translate into your own language.
 	 */
 	 */
-	$source_sans_pro  = _x( 'on', 'Source Sans Pro font: on or off',  'stow' );
+	$source_sans_pro = _x( 'on', 'Source Sans Pro font: on or off', 'stow' );
 
 
 	/* translators: If there are characters in your language that are not supported
 	/* translators: If there are characters in your language that are not supported
 	 * by Droid Serif, translate this to 'off'. Do not translate into your own language.
 	 * by Droid Serif, translate this to 'off'. Do not translate into your own language.
@@ -106,7 +105,7 @@ function stow_fonts_url() {
 	/* translators: If there are characters in your language that are not supported
 	/* translators: If there are characters in your language that are not supported
 	 * by Oswald, translate this to 'off'. Do not translate into your own language.
 	 * by Oswald, translate this to 'off'. Do not translate into your own language.
 	 */
 	 */
-	$oswald  = _x( 'on', 'Oswald font: on or off',  'stow' );
+	$oswald = _x( 'on', 'Oswald font: on or off', 'stow' );
 
 
 	if ( 'off' !== $source_sans_pro || 'off' !== $droid_serif || 'off' !== $oswald ) {
 	if ( 'off' !== $source_sans_pro || 'off' !== $droid_serif || 'off' !== $oswald ) {
 		$font_families = array();
 		$font_families = array();
@@ -124,7 +123,7 @@ function stow_fonts_url() {
 			'family' => urlencode( implode( '|', $font_families ) ),
 			'family' => urlencode( implode( '|', $font_families ) ),
 			'subset' => urlencode( 'latin,latin-ext' ),
 			'subset' => urlencode( 'latin,latin-ext' ),
 		);
 		);
-		$fonts_url = add_query_arg( $query_args, "https://fonts.googleapis.com/css" );
+		$fonts_url  = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
 	}
 	}
 
 
 	return esc_url_raw( $fonts_url );
 	return esc_url_raw( $fonts_url );
@@ -142,7 +141,7 @@ function stow_scripts() {
 	wp_dequeue_style( 'varia-style' );
 	wp_dequeue_style( 'varia-style' );
 
 
 	// enqueue child styles
 	// enqueue child styles
-	wp_enqueue_style('stow-style', get_stylesheet_uri(), array(), wp_get_theme()->get( 'Version' ));
+	wp_enqueue_style( 'stow-style', get_stylesheet_uri(), array(), wp_get_theme()->get( 'Version' ) );
 
 
 	// enqueue child RTL styles
 	// enqueue child RTL styles
 	wp_style_add_data( 'stow-style', 'rtl', 'replace' );
 	wp_style_add_data( 'stow-style', 'rtl', 'replace' );

+ 0 - 1
stratford/functions.php

@@ -30,7 +30,6 @@ if ( ! function_exists( 'stratford_setup' ) ) :
 	 * as indicating support for post thumbnails.
 	 * as indicating support for post thumbnails.
 	 */
 	 */
 	function stratford_setup() {
 	function stratford_setup() {
-
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		// Add child theme editor styles, compiled from `style-child-theme-editor.scss`.
 		add_editor_style( 'style-editor.css' );
 		add_editor_style( 'style-editor.css' );
 
 

+ 150 - 126
textbook/functions.php

@@ -8,107 +8,116 @@
  */
  */
 
 
 if ( ! function_exists( 'textbook_setup' ) ) :
 if ( ! function_exists( 'textbook_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 textbook_setup() {
-	/*
-	 * Make theme available for translation.
-	 * Translations can be filed in the /languages/ directory.
-	 * If you're building a theme based on components, use a find and replace
-	 * to change 'textbook' to the name of your theme in all the template files.
-	 */
-	load_theme_textdomain( 'textbook', get_template_directory() . '/languages' );
-
-	// Add default posts and comments RSS feed links to head.
-	add_theme_support( 'automatic-feed-links' );
 
 
 	/*
 	/*
-	 * Let WordPress manage the document title.
-	 * By adding theme support, we declare that this theme does not use a
-	 * hard-coded <title> tag in the document head, and expect WordPress to
-	 * provide it for us.
-	 */
-	add_theme_support( 'title-tag' );
+	* 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 textbook_setup() {
+		/*
+		 * Make theme available for translation.
+		 * Translations can be filed in the /languages/ directory.
+		 * If you're building a theme based on components, use a find and replace
+		 * to change 'textbook' to the name of your theme in all the template files.
+		 */
+		load_theme_textdomain( 'textbook', get_template_directory() . '/languages' );
 
 
-	/**
-	 * 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' );
+		// Add default posts and comments RSS feed links to head.
+		add_theme_support( 'automatic-feed-links' );
 
 
-	// Adds theme-specific images sizes
-	add_image_size( 'textbook-thumbnail-avatar', 100, 100, true );
-	add_image_size( 'textbook-featured-content-image', 600, 600, true );
-	add_image_size( 'textbook-featured-content-image-full', 1148, 600, true );
+		/*
+		 * Let WordPress manage the document title.
+		 * By adding theme support, we declare that this theme does not use a
+		 * hard-coded <title> tag in the document head, and expect WordPress to
+		 * provide it for us.
+		 */
+		add_theme_support( 'title-tag' );
 
 
-	/**
-	 * This theme uses wp_nav_menu() in two locations.
-	 */
-	register_nav_menus( array(
-		'header' => __( 'Header', 'textbook' ),
-		'footer' => __( 'Footer', 'textbook' ),
-	) );
+		/**
+		 * 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' );
 
 
-	/*
-	 * 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 support for responsive embeds.
-	add_theme_support( 'responsive-embeds' );
-
-	// Add support for custom color scheme.
-	add_theme_support( 'editor-color-palette', array(
-		array(
-			'name'  => esc_html__( 'Red', 'textbook' ),
-			'slug'  => 'red',
-			'color' => '#ce4639',
-		),
-		array(
-			'name'  => esc_html__( 'Green', 'textbook' ),
-			'slug'  => 'green',
-			'color' => '#26866d',
-		),
-		array(
-			'name'  => esc_html__( 'Purple', 'textbook' ),
-			'slug'  => 'purple',
-			'color' => '#8b66d6',
-		),
-		array(
-			'name'  => esc_html__( 'Dark Gray', 'textbook' ),
-			'slug'  => 'dark-gray',
-			'color' => '#222',
-		),
-		array(
-			'name'  => esc_html__( 'Medium Gray', 'textbook' ),
-			'slug'  => 'medium-gray',
-			'color' => '#777',
-		),
-		array(
-			'name'  => esc_html__( 'Light Gray', 'textbook' ),
-			'slug'  => 'light-gray',
-			'color' => '#e1dfdc',
-		),
-		array(
-			'name'  => esc_html__( 'White', 'textbook' ),
-			'slug'  => 'white',
-			'color' => '#fff',
-		),
-	) );
-}
+		// Adds theme-specific images sizes
+		add_image_size( 'textbook-thumbnail-avatar', 100, 100, true );
+		add_image_size( 'textbook-featured-content-image', 600, 600, true );
+		add_image_size( 'textbook-featured-content-image-full', 1148, 600, true );
+
+		/**
+		 * This theme uses wp_nav_menu() in two locations.
+		 */
+		register_nav_menus(
+			array(
+				'header' => __( 'Header', 'textbook' ),
+				'footer' => __( 'Footer', 'textbook' ),
+			)
+		);
+
+		/*
+		 * 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 support for responsive embeds.
+		add_theme_support( 'responsive-embeds' );
+
+		// Add support for custom color scheme.
+		add_theme_support(
+			'editor-color-palette',
+			array(
+				array(
+					'name'  => esc_html__( 'Red', 'textbook' ),
+					'slug'  => 'red',
+					'color' => '#ce4639',
+				),
+				array(
+					'name'  => esc_html__( 'Green', 'textbook' ),
+					'slug'  => 'green',
+					'color' => '#26866d',
+				),
+				array(
+					'name'  => esc_html__( 'Purple', 'textbook' ),
+					'slug'  => 'purple',
+					'color' => '#8b66d6',
+				),
+				array(
+					'name'  => esc_html__( 'Dark Gray', 'textbook' ),
+					'slug'  => 'dark-gray',
+					'color' => '#222',
+				),
+				array(
+					'name'  => esc_html__( 'Medium Gray', 'textbook' ),
+					'slug'  => 'medium-gray',
+					'color' => '#777',
+				),
+				array(
+					'name'  => esc_html__( 'Light Gray', 'textbook' ),
+					'slug'  => 'light-gray',
+					'color' => '#e1dfdc',
+				),
+				array(
+					'name'  => esc_html__( 'White', 'textbook' ),
+					'slug'  => 'white',
+					'color' => '#fff',
+				),
+			)
+		);
+	}
 endif;
 endif;
 add_action( 'after_setup_theme', 'textbook_setup' );
 add_action( 'after_setup_theme', 'textbook_setup' );
 
 
@@ -140,22 +149,26 @@ add_action( 'after_switch_theme', 'textbook_update_date_format', 0 );
  * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
  * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
  */
  */
 function textbook_widgets_init() {
 function textbook_widgets_init() {
-	register_sidebar( array(
-		'name'          => esc_html__( 'Sidebar', 'textbook' ),
-		'id'            => 'sidebar-1',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer Sidebar', 'textbook' ),
-		'id'            => 'sidebar-2',
-		'before_widget' => '<section id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</section>',
-		'before_title'  => '<h2 class="widget-title">',
-		'after_title'   => '</h2>',
-	) );
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Sidebar', 'textbook' ),
+			'id'            => 'sidebar-1',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer Sidebar', 'textbook' ),
+			'id'            => 'sidebar-2',
+			'before_widget' => '<section id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</section>',
+			'before_title'  => '<h2 class="widget-title">',
+			'after_title'   => '</h2>',
+		)
+	);
 }
 }
 add_action( 'widgets_init', 'textbook_widgets_init' );
 add_action( 'widgets_init', 'textbook_widgets_init' );
 
 
@@ -294,7 +307,6 @@ function textbook_scripts() {
 	// Block stylesheets
 	// Block stylesheets
 	wp_enqueue_style( 'textbook-block-style', get_template_directory_uri() . '/assets/css/blocks.css', array( 'textbook-style' ), '20181018' );
 	wp_enqueue_style( 'textbook-block-style', get_template_directory_uri() . '/assets/css/blocks.css', array( 'textbook-style' ), '20181018' );
 
 
-
 	/*
 	/*
 	 * Scripts
 	 * Scripts
 	 */
 	 */
@@ -317,22 +329,34 @@ function textbook_scripts() {
 	}
 	}
 
 
 	// Menu toggle text
 	// Menu toggle text
-	wp_localize_script( 'textbook-navigation', 'textBookMenuToggleText', array(
-		'menu'  => esc_html__( 'Menu', 'textbook' ),
-		'close' => esc_html__( 'Close', 'textbook' ),
-	) );
+	wp_localize_script(
+		'textbook-navigation',
+		'textBookMenuToggleText',
+		array(
+			'menu'  => esc_html__( 'Menu', 'textbook' ),
+			'close' => esc_html__( 'Close', 'textbook' ),
+		)
+	);
 
 
 	// Expand collapse menu text
 	// Expand collapse menu text
-	wp_localize_script( 'textbook-navigation', 'textBookScreenReaderText', array(
-		'expand'   => esc_html__( 'expand child menu', 'textbook' ),
-		'collapse' => esc_html__( 'collapse child menu', 'textbook' ),
-	) );
+	wp_localize_script(
+		'textbook-navigation',
+		'textBookScreenReaderText',
+		array(
+			'expand'   => esc_html__( 'expand child menu', 'textbook' ),
+			'collapse' => esc_html__( 'collapse child menu', 'textbook' ),
+		)
+	);
 
 
 	// Search toggle text
 	// Search toggle text
-	wp_localize_script( 'textbook-navigation', 'textBookSearchToggleText', array(
-		'search'   => esc_html__( 'Search', 'textbook' ),
-		'close'    => esc_html__( 'Close', 'textbook' )
-	) );
+	wp_localize_script(
+		'textbook-navigation',
+		'textBookSearchToggleText',
+		array(
+			'search' => esc_html__( 'Search', 'textbook' ),
+			'close'  => esc_html__( 'Close', 'textbook' ),
+		)
+	);
 
 
 }
 }
 add_action( 'wp_enqueue_scripts', 'textbook_scripts' );
 add_action( 'wp_enqueue_scripts', 'textbook_scripts' );
@@ -361,8 +385,8 @@ add_action( 'enqueue_block_editor_assets', 'textbook_block_editor_styles' );
 /*
 /*
  * Check whether the browser supports JavaScript.
  * Check whether the browser supports JavaScript.
  */
  */
-function textbook_html_js_class () {
-	echo '<script>document.documentElement.className = document.documentElement.className.replace("no-js","js");</script>'. "\n";
+function textbook_html_js_class() {
+	echo '<script>document.documentElement.className = document.documentElement.className.replace("no-js","js");</script>' . "\n";
 }
 }
 add_action( 'wp_head', 'textbook_html_js_class', 1 );
 add_action( 'wp_head', 'textbook_html_js_class', 1 );
 
 

+ 173 - 151
toujours/functions.php

@@ -8,143 +8,161 @@
  */
  */
 
 
 if ( ! function_exists( 'toujours_setup' ) ) :
 if ( ! function_exists( 'toujours_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 toujours_setup() {
-	/*
-	 * Make theme available for translation.
-	 * Translations can be filed in the /languages/ directory.
-	 * If you're building a theme based on toujours, use a find and replace
-	 * to change 'toujours' to the name of your theme in all the template files.
+
+	/**
+	 * 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.
 	 */
 	 */
-	load_theme_textdomain( 'toujours', get_template_directory() . '/languages' );
+	function toujours_setup() {
+		/*
+		 * Make theme available for translation.
+		 * Translations can be filed in the /languages/ directory.
+		 * If you're building a theme based on toujours, use a find and replace
+		 * to change 'toujours' to the name of your theme in all the template files.
+		 */
+		load_theme_textdomain( 'toujours', get_template_directory() . '/languages' );
 
 
-	// Add default posts and comments RSS feed links to head.
-	add_theme_support( 'automatic-feed-links' );
+		// Add default posts and comments RSS feed links to head.
+		add_theme_support( 'automatic-feed-links' );
 
 
-	/*
-	 * Let WordPress manage the document title.
-	 * By adding theme support, we declare that this theme does not use a
-	 * hard-coded <title> tag in the document head, and expect WordPress to
-	 * provide it for us.
-	 */
-	add_theme_support( 'title-tag' );
+		/*
+		 * Let WordPress manage the document title.
+		 * By adding theme support, we declare that this theme does not use a
+		 * hard-coded <title> tag in the document head, and expect WordPress to
+		 * provide it for us.
+		 */
+		add_theme_support( 'title-tag' );
 
 
-	// Add support for responsive embeds.
-	add_theme_support( 'responsive-embeds' );
+		// Add support for responsive embeds.
+		add_theme_support( 'responsive-embeds' );
 
 
- 	// Add custom colors to Gutenberg
-	add_theme_support(
-		'editor-color-palette', array(
-			array(
-				'name'  => esc_html__( 'Blue', 'toujours' ),
-				'slug' => 'blue',
-				'color' => '#2590ec',
-			),
-			array(
-				'name'  => esc_html__( 'Dark Gray', 'toujours' ),
-				'slug' => 'dark-gray',
-				'color' => '#404040',
-			),
-			array(
-				'name'  => esc_html__( 'Medium Gray', 'toujours' ),
-				'slug' => 'medium-gray',
-				'color' => '#666',
-			),
+		// Add custom colors to Gutenberg
+		add_theme_support(
+			'editor-color-palette',
 			array(
 			array(
-				'name'  => esc_html__( 'Light Gray', 'toujours' ),
-				'slug' => 'light-gray',
-				'color' => '#eee',
-			),
-			array(
-				'name'  => esc_html__( 'White', 'toujours' ),
-				'slug' => 'white',
-				'color' => '#fff',
-			),
-		)
-	);
+				array(
+					'name'  => esc_html__( 'Blue', 'toujours' ),
+					'slug'  => 'blue',
+					'color' => '#2590ec',
+				),
+				array(
+					'name'  => esc_html__( 'Dark Gray', 'toujours' ),
+					'slug'  => 'dark-gray',
+					'color' => '#404040',
+				),
+				array(
+					'name'  => esc_html__( 'Medium Gray', 'toujours' ),
+					'slug'  => 'medium-gray',
+					'color' => '#666',
+				),
+				array(
+					'name'  => esc_html__( 'Light Gray', 'toujours' ),
+					'slug'  => 'light-gray',
+					'color' => '#eee',
+				),
+				array(
+					'name'  => esc_html__( 'White', 'toujours' ),
+					'slug'  => 'white',
+					'color' => '#fff',
+				),
+			)
+		);
 
 
-	/*
-	 * Editor styles
-	 */
-	add_editor_style( array( get_template_directory_uri() . '/editor-style.css', toujours_fonts_url() ) );
+		/*
+		 * Editor styles
+		 */
+		add_editor_style( array( get_template_directory_uri() . '/editor-style.css', toujours_fonts_url() ) );
 
 
-	/*
-	 * 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' );
+		/*
+		 * 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' );
 
 
-	/*
-	 * Custom image sizes
-	 */
-	add_image_size( 'toujours-banner', 1160, 600, true );
-	add_image_size( 'toujours-featured', 940, 9999 );
-	add_image_size( 'toujours-trio', 680, 383, true ); /* image size larger for mobile */
+		/*
+		 * Custom image sizes
+		 */
+		add_image_size( 'toujours-banner', 1160, 600, true );
+		add_image_size( 'toujours-featured', 940, 9999 );
+		add_image_size( 'toujours-trio', 680, 383, true ); /* image size larger for mobile */
 
 
-	/*
-	 * Register menu locations
-	 *
-	 * Include check to see if jetpack_social_menu supported
-	 */
-	if ( ! function_exists( 'jetpack_social_menu' ) ) {
-		register_nav_menus( array(
-			'primary' => esc_html__( 'Primary Menu', 'toujours' ),
-			'social' => esc_html__( 'Social Menu', 'toujours' ),
-		) );
-	} else {
-		register_nav_menus( array(
-			'primary' => esc_html__( 'Primary Menu', 'toujours' ),
-		) );
-	}
+		/*
+		 * Register menu locations
+		 *
+		 * Include check to see if jetpack_social_menu supported
+		 */
+		if ( ! function_exists( 'jetpack_social_menu' ) ) {
+			register_nav_menus(
+				array(
+					'primary' => esc_html__( 'Primary Menu', 'toujours' ),
+					'social'  => esc_html__( 'Social Menu', 'toujours' ),
+				)
+			);
+		} else {
+			register_nav_menus(
+				array(
+					'primary' => esc_html__( 'Primary Menu', 'toujours' ),
+				)
+			);
+		}
 
 
-	/*
-	 * 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',
-	) );
-
-	/*
-	 * Enable support for Post Formats.
-	 * See https://developer.wordpress.org/themes/functionality/post-formats/
-	 */
-	add_theme_support( 'post-formats', array(
-		'aside',
-		'audio',
-		'gallery',
-		'image',
-		'video',
-		'quote',
-		'link',
-		'status',
-	) );
-
-	// Set up the WordPress core custom background feature.
-	add_theme_support( 'custom-background', apply_filters( 'toujours_custom_background_args', array(
-		'default-color' => 'eeeeee',
+		/*
+		 * 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',
+			)
+		);
 
 
 		/*
 		/*
-		 * We're using a unique filename for the background image
-		 * to avoid users uploading a file with the same filename
-		 * and avoiding conflict with the `user-background` body_class
-		 * in inc/extras.php and assets/js/customizer.js
+		 * Enable support for Post Formats.
+		 * See https://developer.wordpress.org/themes/functionality/post-formats/
 		 */
 		 */
+		add_theme_support(
+			'post-formats',
+			array(
+				'aside',
+				'audio',
+				'gallery',
+				'image',
+				'video',
+				'quote',
+				'link',
+				'status',
+			)
+		);
 
 
-	 	'default-image' => esc_url( get_template_directory_uri() ) . '/images/toujoursbackground20160105.png',
-	) ) );
-}
+		// Set up the WordPress core custom background feature.
+		add_theme_support(
+			'custom-background',
+			apply_filters(
+				'toujours_custom_background_args',
+				array(
+					'default-color' => 'eeeeee',
+
+					/*
+					* We're using a unique filename for the background image
+					* to avoid users uploading a file with the same filename
+					* and avoiding conflict with the `user-background` body_class
+					* in inc/extras.php and assets/js/customizer.js
+					*/
+
+					'default-image' => esc_url( get_template_directory_uri() ) . '/images/toujoursbackground20160105.png',
+				)
+			)
+		);
+	}
 endif; // toujours_setup
 endif; // toujours_setup
 add_action( 'after_setup_theme', 'toujours_setup' );
 add_action( 'after_setup_theme', 'toujours_setup' );
 
 
@@ -195,19 +213,19 @@ function toujours_recent_three_posts() {
 		$exclude_tag = '';
 		$exclude_tag = '';
 		if ( toujours_has_banner_posts( 1 ) ) {
 		if ( toujours_has_banner_posts( 1 ) ) {
 			$featured_options = get_option( 'featured-content' );
 			$featured_options = get_option( 'featured-content' );
-			$featured_tag_id = $featured_options[ 'tag-id' ];
-			$featured_show = $featured_options[ 'show-all' ];
+			$featured_tag_id  = $featured_options['tag-id'];
+			$featured_show    = $featured_options['show-all'];
 
 
 			if ( 0 == $featured_show ) {
 			if ( 0 == $featured_show ) {
 				$exclude_tag = $featured_tag_id;
 				$exclude_tag = $featured_tag_id;
 			}
 			}
 		}
 		}
 
 
-		$args = array(
+		$args   = array(
 			'ignore_sticky_posts' => 1,
 			'ignore_sticky_posts' => 1,
-			'post__not_in'   => get_option( 'sticky_posts' ),
-			'posts_per_page' => '3',
-			'tag__not_in' => array( $exclude_tag ),
+			'post__not_in'        => get_option( 'sticky_posts' ),
+			'posts_per_page'      => '3',
+			'tag__not_in'         => array( $exclude_tag ),
 		);
 		);
 		$latest = new WP_Query();
 		$latest = new WP_Query();
 		$latest->query( $args );
 		$latest->query( $args );
@@ -258,7 +276,7 @@ add_action( 'pre_get_posts', 'toujours_home_posts' );
  * Wrap avatars in HTML for easier styling
  * Wrap avatars in HTML for easier styling
  */
  */
 function toujours_get_avatar( $avatar ) {
 function toujours_get_avatar( $avatar ) {
-	if( ! is_admin() ) {
+	if ( ! is_admin() ) {
 		$avatar = '<span class="avatar-container"><span class="avatar-crop">' . $avatar . '</span></span>';
 		$avatar = '<span class="avatar-container"><span class="avatar-crop">' . $avatar . '</span></span>';
 	}
 	}
 	return $avatar;
 	return $avatar;
@@ -311,25 +329,29 @@ function toujours_fonts_url() {
  * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
  * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
  */
  */
 function toujours_widgets_init() {
 function toujours_widgets_init() {
-	register_sidebar( array(
-		'name'          => esc_html__( 'Sidebar', 'toujours' ),
-		'id'            => 'sidebar-1',
-		'description'   => '',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h3 class="widget-title">',
-		'after_title'   => '</h3>',
-	) );
-
-	register_sidebar( array(
-		'name'          => esc_html__( 'Footer', 'toujours' ),
-		'id'            => 'footer',
-		'description'   => '',
-		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-		'after_widget'  => '</aside>',
-		'before_title'  => '<h3 class="widget-title">',
-		'after_title'   => '</h3>',
-	) );
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Sidebar', 'toujours' ),
+			'id'            => 'sidebar-1',
+			'description'   => '',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h3 class="widget-title">',
+			'after_title'   => '</h3>',
+		)
+	);
+
+	register_sidebar(
+		array(
+			'name'          => esc_html__( 'Footer', 'toujours' ),
+			'id'            => 'footer',
+			'description'   => '',
+			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+			'after_widget'  => '</aside>',
+			'before_title'  => '<h3 class="widget-title">',
+			'after_title'   => '</h3>',
+		)
+	);
 }
 }
 add_action( 'widgets_init', 'toujours_widgets_init' );
 add_action( 'widgets_init', 'toujours_widgets_init' );
 
 
@@ -342,11 +364,11 @@ add_action( 'widgets_init', 'toujours_widgets_init' );
  * @return  integer number of widgets in the sidebar
  * @return  integer number of widgets in the sidebar
  */
  */
 function toujours_count_widgets( $id ) {
 function toujours_count_widgets( $id ) {
-	$count = 0;
+	$count            = 0;
 	$sidebars_widgets = wp_get_sidebars_widgets();
 	$sidebars_widgets = wp_get_sidebars_widgets();
 
 
 	if ( array_key_exists( $id, $sidebars_widgets ) ) {
 	if ( array_key_exists( $id, $sidebars_widgets ) ) {
-		$count = (int) count( (array) $sidebars_widgets[$id] );
+		$count = (int) count( (array) $sidebars_widgets[ $id ] );
 	}
 	}
 	return $count;
 	return $count;
 }
 }
@@ -409,7 +431,7 @@ function toujours_scripts() {
 	wp_enqueue_script( 'toujours-global', get_template_directory_uri() . '/js/global.js', array( 'jquery', 'flexslider', 'masonry' ), '20151215', true );
 	wp_enqueue_script( 'toujours-global', get_template_directory_uri() . '/js/global.js', array( 'jquery', 'flexslider', 'masonry' ), '20151215', true );
 	// Localize 'Previous' and 'Next' links in slideshow
 	// Localize 'Previous' and 'Next' links in slideshow
 	$translation_array = array(
 	$translation_array = array(
-		'next_link' => esc_html__( 'Next Slide', 'toujours' ),
+		'next_link'     => esc_html__( 'Next Slide', 'toujours' ),
 		'previous_link' => esc_html__( 'Previous Slide', 'toujours' ),
 		'previous_link' => esc_html__( 'Previous Slide', 'toujours' ),
 	);
 	);
 	wp_localize_script( 'toujours-global', 'toujours_script_strings', $translation_array );
 	wp_localize_script( 'toujours-global', 'toujours_script_strings', $translation_array );

+ 1 - 0
varia/functions.php

@@ -30,6 +30,7 @@ if ( version_compare( $GLOBALS['wp_version'], '4.7', '<' ) ) {
 }
 }
 
 
 if ( ! function_exists( 'varia_setup' ) ) :
 if ( ! function_exists( 'varia_setup' ) ) :
+
 	/**
 	/**
 	 * Sets up theme defaults and registers support for various WordPress features.
 	 * Sets up theme defaults and registers support for various WordPress features.
 	 *
 	 *