44 Commits 91f81c8adf ... e202af69e0

Author SHA1 Message Date
  Paul e202af69e0 Delete obsolete test files 8 years ago
  Paul 9830180b18 Webshop aanpassingen 8 years ago
  Paul 838e27f677 Bump version to 1.2 8 years ago
  Paul d4e4b25c0e Use designer specified font 8 years ago
  Paul 9df4675c1d Attempt to fix issue #7 8 years ago
  Paul 538a9c94df Fix warnings 8 years ago
  Paul ca45276343 Trololo 8 years ago
  Paul 13bc86b219 Modify WpRenderer to use WordPressInterface 8 years ago
  Paul 2737fa902a 100% code coverage 8 years ago
  Paul dbd969ea71 Call into WP via interface, more test coverage 8 years ago
  Paul a7c9132b4e Nieuwe unit tests 8 years ago
  Paul 0a5dec2fad Corrected a docblock 8 years ago
  Paul 84fd850be9 Removed WP dependency in test suite 8 years ago
  Paul 4187d11bc8 Throw exceptions in the freaking getters/setters 8 years ago
  Paul cdde7dd38a remove testConstruct dependencies 8 years ago
  Paul 2a4fe0355d Move shopp call to post processor 8 years ago
  Paul 1da2b4ecb5 Add missing test 8 years ago
  Paul 522aad3e11 Acknowledgement for Paulyg/Autoloader 8 years ago
  Paul 5197c0af17 TemplateProcessor: test non-existant method case 8 years ago
  Paul db39e3af80 TemplateProcessor: handle exceptions 8 years ago
  Paul a35a6a3134 Docblocks 8 years ago
  Paul 1e1ee2b254 Test suite improvements 8 years ago
  Paul b153ebbd12 Move mock class out of the way 8 years ago
  Paul 9cd5588452 Convenience constructors are for plebs 8 years ago
  Paul 26fccbc0be Use post-processing instead of static method calls 8 years ago
  Paul a801aa5316 Added docblock 8 years ago
  Paul ed45272c8c New class TemplateProcessor + tests 8 years ago
  Paul 31f096b2d2 Just to be sure 8 years ago
  Paul 65f1d33eec Harden StringRendererFactory 8 years ago
  Paul d327131239 Fix test with WP present 8 years ago
  Paul e5c94fd1ed nieuwe unit tests 8 years ago
  Paul 84654199af We have 5.6 now 8 years ago
  Paul 198a37ab09 whitespace adjustments 8 years ago
  Paul b4f1a8b3bb HelperMainMenu: fixed a bug 8 years ago
  Paul 22a462bd80 Laura\Util: completed the unit tests 8 years ago
  Paul f17212a729 Laura\Util: documentation + small fixes 8 years ago
  Paul 977404737c Nieuwe unit tests 8 years ago
  Paul 9fb189c209 Slideshow homepage leesbaar op mobiel 8 years ago
  Paul cb28b432bb 332 is the new 273 8 years ago
  Paul c045f58573 Don't output markup if no ad present 8 years ago
  Paul ca2c619432 Advertentie: some refactorings 8 years ago
  Paul bb1220e153 Fixed deprecation warnings with PHPUnit 5.4 8 years ago
  Paul 2db35ff940 Fixed PHPUnit 5.3 8 years ago
  Paul 65946d20c9 Use category query instead of fixed post ID 8 years ago

+ 3 - 0
README.md

@@ -22,3 +22,6 @@ git archive --prefix=wp-content/themes/enfold-child/ -o hg-enfold-theme.zip HEAD
 lib/error-dumper is geschreven door Bart?omiej Krukowski, en
 wordt alleen gebruikt wanneer Wordpress in debug mode draait.
 Zie het bestand lib/error-dumper/COPYING voor details.
+
+lib/Autoloader.php is geschreven door Paul Garvin, voor meer
+informatie zie het commentaar blok bovenaan het bestand zelf.

BIN
assets/KonTikiEnchantedJF-Regular.ttf


BIN
assets/KonTikiEnchantedJF-Regular.woff


BIN
assets/KonTikiEnchantedJF-Regular.woff2


+ 31 - 1
assets/avia.js

@@ -50,7 +50,7 @@
 		(function() {
 			var shopmenu = $('div.shopmenu')
 
-			$('#menu-item-273').hover(
+			$('#menu-item-332').hover(
 				function() { shopmenu.removeClass('hidez') },
 				function() { }
 			)
@@ -58,6 +58,36 @@
 				function() { },
 				function() { shopmenu.addClass('hidez') }
 			)
+
+			var elCheckout = document.getElementById("checkout")
+			if (null != elCheckout) {
+				var shipments = new Array(2)
+				var payments  = new Array(2)
+				var tmp = $(elCheckout).find("label>input.shipmethod")
+
+				shipments[0] = tmp.first()
+				shipments[1] = tmp.last()
+
+				tmp = $(elCheckout).find("label>input[name='paymethod']")
+
+				payments[0] = tmp.first()
+				payments[1] = tmp.last()
+
+				payments[0].change(function() {
+					shipments[1].prop("checked", true)
+				})
+				payments[1].change(function() {
+					shipments[0].prop("checked", true)
+				})
+				shipments[0].change(function() {
+					payments[1].prop("checked", true)
+				})
+				shipments[1].change(function() {
+					payments[0].prop("checked", true)
+				})
+
+				payments[1].parent().append(" (verzending)")
+			}
 		})()
 
 

+ 4 - 8
functions.php

@@ -40,14 +40,10 @@ add_theme_support('avia_template_builder_custom_css');
 
 namespace ITSociaal\Themes\Houtgrutter
 {
-	/*tell flexweb to use @#%PHP5.6
 	const LIBDIR = __DIR__ . "/lib";
-	const SRCDIR = __DIR__ . "/src";*/
+	const SRCDIR = __DIR__ . "/src";
 
-	define("HOUTGRUTTER_LIBDIR", __DIR__ . "/lib");
-	define("HOUTGRUTTER_SRCDIR", __DIR__ . "/src");
-
-	require_once HOUTGRUTTER_LIBDIR . '/Autoloader.php';
+	require_once LIBDIR . '/Autoloader.php';
 	class_alias("Paulyg\\Autoloader", __NAMESPACE__ . "\\Autoloader");
 
 	function do_autoloader($namespaces)
@@ -75,8 +71,8 @@ namespace ITSociaal\Themes\Houtgrutter
 	}
 
 	do_autoloader([
-		[__NAMESPACE__, HOUTGRUTTER_SRCDIR],
-		["ErrorDumper", HOUTGRUTTER_LIBDIR . "/error-dumper/src"],
+		[__NAMESPACE__, SRCDIR],
+		["ErrorDumper", LIBDIR . "/error-dumper/src"],
 		//["Cypress\\Curry", LIBDIR . "/php-curry"],
 	]);
 

+ 3 - 0
phpunit.xml.dist

@@ -6,6 +6,7 @@
 	bootstrap="./test/bootstrap.php"
 	cacheTokens="true"
 	checkForUnintentionallyCoveredCode="true"
+	beStrictAboutCoversAnnotation="true"
 	colors="true"
 	timeoutForMediumTests="3"
 	timeoutForLargeTests="5"
@@ -17,6 +18,8 @@
 			<directory>./test</directory>
 			<exclude>
 				<file>./test/Bootstrap.php</file>
+				<directory>./test/_files</directory>
+				<directory>./test/Laura/_files</directory>
 			</exclude>
 		</testsuite>
 	</testsuites>

+ 21 - 1
src/F.php

@@ -33,7 +33,7 @@ class F
 	 * In case you're tired of writing call_user_func_array
 	 * May be removed in the future, because it's quite meh
 	 */
-	public static function apply(callable $func, $args)
+	public static function apply(callable $func, $args=[])
 	{
 		return call_user_func_array($func, $args);
 	}
@@ -95,6 +95,13 @@ class F
 		return $param;
 	}
 
+	/**
+	 * Creates a function that returns the given $property of an object
+	 *
+	 * @param string $property Name
+	 *
+	 * @return \Closure Function that returns $property from argument
+	 */
 	public static function pick($property)
 	{
 		return function($obj) use ($property) {
@@ -104,6 +111,19 @@ class F
 		};
 	}
 
+	/**
+	 * Creates a function that calls a function depending on a condition
+	 *
+	 * When called, passes its argument to $test and calls either $onTrue or
+	 * $onFalse depending on the return value of $test. $onFalse can be null
+	 * and the function will by default simply return the argument.
+	 *
+	 * @param callable $test    Evaluates its argument and returns bool
+	 * @param callable $onTrue  Called with argument in the true case
+	 * @param callable $onFalse Called with argument in the false case
+	 *
+	 * @return \Closure takes one argument
+	 */
 	public static function conditional($test, $onTrue, $onFalse = null)
 	{
 		return function($subject) use ($test, $onTrue, $onFalse)

+ 47 - 0
src/GlobalWordPress.php

@@ -0,0 +1,47 @@
+<?php
+namespace ITSociaal\Themes\Houtgrutter;
+
+class GlobalWordPress implements WordPressInterface
+{
+	public function avia_append_search_nav(...$args)
+	{
+		return \avia_append_search_nav(...$args);
+	}
+
+	public function avia_get_option(...$args)
+	{
+		return \avia_get_option(...$args);
+	}
+
+	public function get_bloginfo(...$args)
+	{
+		return \get_bloginfo(...$args);
+	}
+
+	public function get_the_post_thumbnail(...$args)
+	{
+		return \get_the_post_thumbnail(...$args);
+	}
+
+	public function has_post_thumbnail(...$args)
+	{
+		return \has_post_thumbnail(...$args);
+	}
+
+	public function load_template(...$args)
+	{
+		return \load_template(...$args);
+	}
+
+	public function shopp(...$args)
+	{
+		return \shopp(...$args);
+	}
+
+	public function wp_nav_menu(...$args)
+	{
+		return \wp_nav_menu(...$args);
+	}
+}
+
+/* vi:set ts=4 sw=4 noet: */

+ 0 - 0
src/Includes/HelperMainMenu.php


Some files were not shown because too many files changed in this diff