From 98b603c1c7d71cfdb209c65501569eb492e00fe7 Mon Sep 17 00:00:00 2001 From: Dimitris Kalliris Date: Wed, 3 Jun 2015 20:31:37 +0300 Subject: [PATCH 1/5] initialise infinite scroll support (jetpack module) --- functions.php | 20 ++++++++++++++++++++ views/main.twig | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/functions.php b/functions.php index b4f6a79..4c08537 100644 --- a/functions.php +++ b/functions.php @@ -61,3 +61,23 @@ function Maera() { if ( class_exists( 'Easy_Digital_Downloads' ) ) { Maera_EDD::get_instance(); } + +/** + * Add theme support for infinite scroll. + * http://jetpack.me/support/infinite-scroll/ + * + * @uses add_theme_support + * @return void + */ +function maera_infinite_scroll_init() { + add_theme_support( 'infinite-scroll', array( + 'type' => 'scroll', + 'footer_widgets' => false, + 'container' => 'main', + 'footer' => 'false', + 'wrapper' => true, + 'render' => false, + 'posts_per_page' => false, + ) ); +} +add_action( 'after_setup_theme', 'maera_infinite_scroll_init' ); diff --git a/views/main.twig b/views/main.twig index 6fabc2f..8806475 100644 --- a/views/main.twig +++ b/views/main.twig @@ -1,6 +1,6 @@ {% extends "base.twig" %} {% block main %} -
+
{% if title %}

{{ title }}

{% endif %} {% block content %} {{ __( 'Sorry, no content', 'maera' ) }} From 21abbd782e549c1f3755a5010a90e6eb82845b96 Mon Sep 17 00:00:00 2001 From: Aristeides Stathopoulos Date: Wed, 3 Jun 2015 20:32:45 +0300 Subject: [PATCH 2/5] version 1.2 --- CHANGELOG.md | 4 +++- includes/class-maera.php | 2 +- style.css | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86ffee3..fe3bf24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ -## HEAD +## 1.2 +* New: Jetpack Infinite scroll implemented. +* New: Kirki & Timber plugins as well as some Jetpack classes are now embedded. Installing external plugins is no longer required for the core theme. * New: Easy-Digital-Downloads integration * New: WooCommerce integration * Fix: Core shell CSS tweaks diff --git a/includes/class-maera.php b/includes/class-maera.php index 62fdeb3..55f7745 100644 --- a/includes/class-maera.php +++ b/includes/class-maera.php @@ -16,7 +16,7 @@ class Maera { function __construct() { - Maera_Helper::define( 'MAERA_VERSION', '1.1.1' ); + Maera_Helper::define( 'MAERA_VERSION', '1.2' ); Maera_Helper::define( 'MAERA_ASSETS_URL', get_stylesheet_directory_uri() . '/assets' ); add_filter( 'kirki/config', array( $this, 'customizer_config' ) ); diff --git a/style.css b/style.css index a0d8fc3..fc47bfb 100644 --- a/style.css +++ b/style.css @@ -2,7 +2,7 @@ Theme Name: Maera Theme URI: http://maera.io Description: Advanced WordPress theme based on Bootstrap. -Version: 1.1.1 +Version: 1.2 Author: aristath, fovoc Author URI: http://wpmu.io License: GPL v2 License From 7e3ea3639a9c71e838e96509dcbfea4e587242b2 Mon Sep 17 00:00:00 2001 From: Aristeides Stathopoulos Date: Wed, 3 Jun 2015 20:42:07 +0300 Subject: [PATCH 3/5] bugfix allowing Jetpack to be activated. --- functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/functions.php b/functions.php index 4c08537..8168cc1 100644 --- a/functions.php +++ b/functions.php @@ -27,7 +27,7 @@ function maera_autoload_classes( $class_name ) { /** * If Kirki is not installed as a plugin include the embedded Version */ -if ( ! class_exists( 'Kirki' ) ) { +if ( ! class_exists( 'Kirki' ) && ! is_admin() ) { define( 'KIRKI_PATH', get_template_directory() . '/includes/plugins/kirki' ); define( 'KIRKI_URL', get_template_directory_uri() . '/includes/plugins/kirki' ); require_once( get_template_directory() . '/includes/plugins/kirki/kirki.php' ); @@ -36,7 +36,7 @@ function maera_autoload_classes( $class_name ) { /** * If Timber is not installed as a plugin include the embedded version. */ -if ( ! class_exists( 'Timber' ) ) { +if ( ! class_exists( 'Timber' ) && ! is_admin() ) { require_once( get_template_directory() . '/includes/plugins/timber-library/timber.php' ); } @@ -44,7 +44,7 @@ function maera_autoload_classes( $class_name ) { * Dummy function to prevent fatal errors with the Tonesque library * Only used when Jetpack is not installed. */ -if ( ! function_exists( 'jetpack_require_lib' ) ) { +if ( ! function_exists( 'jetpack_require_lib' ) && ! is_admin() ) { function jetpack_require_lib() {} } From 18f95a1f40b2430341b147e39723364a2c93f7da Mon Sep 17 00:00:00 2001 From: Aristeides Stathopoulos Date: Wed, 3 Jun 2015 21:27:10 +0300 Subject: [PATCH 4/5] remove infinite scroll support --- functions.php | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/functions.php b/functions.php index 8168cc1..c938963 100644 --- a/functions.php +++ b/functions.php @@ -61,23 +61,3 @@ function Maera() { if ( class_exists( 'Easy_Digital_Downloads' ) ) { Maera_EDD::get_instance(); } - -/** - * Add theme support for infinite scroll. - * http://jetpack.me/support/infinite-scroll/ - * - * @uses add_theme_support - * @return void - */ -function maera_infinite_scroll_init() { - add_theme_support( 'infinite-scroll', array( - 'type' => 'scroll', - 'footer_widgets' => false, - 'container' => 'main', - 'footer' => 'false', - 'wrapper' => true, - 'render' => false, - 'posts_per_page' => false, - ) ); -} -add_action( 'after_setup_theme', 'maera_infinite_scroll_init' ); From 01ee6dbb6c926dcc8ba3ab1463e51c95a77f3cde Mon Sep 17 00:00:00 2001 From: Aristeides Stathopoulos Date: Wed, 3 Jun 2015 21:44:15 +0300 Subject: [PATCH 5/5] no go --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe3bf24..4925362 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,5 @@ ## 1.2 -* New: Jetpack Infinite scroll implemented. * New: Kirki & Timber plugins as well as some Jetpack classes are now embedded. Installing external plugins is no longer required for the core theme. * New: Easy-Digital-Downloads integration * New: WooCommerce integration