Skip to content

Commit

Permalink
v2.1.1 of the plugin
Browse files Browse the repository at this point in the history
- Fix fatal error (for layout checks)
- Fix body class error
  • Loading branch information
deckerweb committed Dec 19, 2018
1 parent 0d075ca commit 198bb80
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 15 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@

## Changelog of the Plugin

### 🔧 2.1.1 - 2018-12-19

* Tweak: Fixed Fatal error caused from setting field creation function - thanks to user Pete for reporting it!
* Tweak: Fixed Admin styling glitches with Ninja Forms builder (and most likely other plugins) - Thanks to user feedback ([Topic](https://wordpress.org/support/topic/css-error-when-combined-with-ninja-forms/))


### 🎉 2.1.0 - 2018-12-18

* ***New: Brought the plugin back to life after more than five years, yeah! :)***
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
**Requires at least:** 3.4 plus Genesis 1.8+
**Tested up to:** 5.0
**Requires PHP:** 5.6
**Stable tag:** 2.1.0
**Stable tag:** 2.1.1
**License:** GPL-2.0-or-later
**License URI:** https://opensource.org/licenses/GPL-2.0

Expand Down Expand Up @@ -443,6 +443,11 @@ Last but not least, **Special Thanks go out to my family** for allowing me to do
**NOTE for the extra Layouts** The up to nine *additional* layouts added with version 2.0.0 of the plugin back in 2013 are now deprecated as of December 2018. That means, they will NOT receive any more updates and also NO SUPPORT. You can still use them if you want but you need to care for the proper styling, displaying etc. yourself. Therefore it would make more sense for you to not use these option from the plugin but rather register custom layouts yourself and make use of our filters to bring them also into the settings drop-down field. Thanks for your understanding! - This note only regards the *additional layouts*, NOT the plugin itself of course, the plugin is alive and kickin', hehe :-).


### 🔧 2.1.1 - 2018-12-19
* Tweak: Fixed Fatal error caused from setting field creation function - thanks to user Pete for reporting it!
* Tweak: Fixed Admin styling glitches with Ninja Forms builder (and most likely other plugins) - Thanks to user feedback ([Topic](https://wordpress.org/support/topic/css-error-when-combined-with-ninja-forms/))


### 🎉 2.1.0 - 2018-12-18
* ***New: Brought the plugin back to life after more than five years, yeah! :)***
* New: Added plugin support for "Genesis Portfolio Pro" (free, by StudioPress)
Expand Down Expand Up @@ -599,6 +604,10 @@ NEW: Added support for more custom post type by plugins:
## Upgrade Notice


### 2.1.1
Major release: **Back in life :-)** - 3 new Genesis-plugins supported. Lots of improvements, tweaks and fixes. - **Update highly recommended!**


### 2.1.0
Major release: **Back in life :-)** - 3 new Genesis-plugins supported. Lots of improvements, tweaks and fixes. - **Update highly recommended!**

Expand Down
6 changes: 3 additions & 3 deletions genesis-layout-extras.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* Plugin Name: Genesis Layout Extras
* Plugin URI: https://github.com/deckerweb/genesis-layout-extras/
* Description: For Genesis Framework: Allows modifying of default layouts for homepage, various archive, attachment, search, 404 and even bbPress 2.x pages via plugin settings page. Plus: up to 9 alternate layout options as well as additional post type support!
* Version: 2.1.0
* Version: 2.1.1
* Author: David Decker - DECKERWEB
* Author URI: https://deckerweb.de/
* License: GPL-2.0-or-later
Expand Down Expand Up @@ -60,8 +60,8 @@
* @since 1.0.0
*/
/** Plugin version */
define( 'GLE_PLUGIN_VERSION', '2.1.0' );
define( 'GLE_RELEASE_DATE', strtotime( '18 December 2018' ) );
define( 'GLE_PLUGIN_VERSION', '2.1.1' );
define( 'GLE_RELEASE_DATE', strtotime( '19 December 2018' ) );

/** Plugin directory */
define( 'GLE_PLUGIN_DIR', trailingslashit( dirname( __FILE__ ) ) );
Expand Down
35 changes: 26 additions & 9 deletions includes/admin/gle-admin-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ function ddw_gle_layout_select_option( $layout_type, $layout_title, $gle_styles_
*/
function ddw_genesis_layout_extras_option( $gle_layout_title, $gle_layout_option ) {

//$has_alternate_layouts = ddw_gle_is_alternate_layout_registered() ? TRUE : FALSE;

/** Begin form code */
?>

Expand Down Expand Up @@ -676,6 +678,8 @@ function ddw_gle_supported_themedy() {
*
* @since 2.0.0
*
* @uses ddw_gle_is_genesis_cpt_archive_settings_available()
*
* @return string Strings of admin body classes.
*/
function ddw_gle_admin_body_class( $classes ) {
Expand All @@ -687,25 +691,27 @@ function ddw_gle_admin_body_class( $classes ) {

/** Add admin body class */
if ( genesis_is_menu_page( 'gle-layout-extras' )
&& ! class_exists( 'Genesis_Admin_CPT_Archive_Settings' )
&& ! ddw_gle_is_genesis_cpt_archive_settings_available()
) {
return $classes . ' gle-pre-g200';
}

/** Return the default */
return $classes;

} // end function


/**
* Check if any of our nine alternate layout options are currently registered in
* Genesis Layouts.
*
* @link https://stackoverflow.com/questions/7542694/in-array-multiple-values
*
* @since 2.1.0
* @since 2.1.1 Fixed, simplified and reworked the logic.
*
* @see ddw_genesis_layout_extras_option()
*
* @uses genesis_get_layouts()
* @uses genesis_get_layout()
*
* @return bool TRUE if any of our alternate layouts is currently registered in
* Genesis Layouts, FALSE otherwise.
Expand All @@ -725,14 +731,25 @@ function ddw_gle_is_alternate_layout_registered() {
'sidebar-content-sidebaralt',
);

/** All current Genesis layouts */
$genesis_layouts = array_keys( genesis_get_layouts() );
/** Set default */
$layout_check = FALSE;

/** Loop through all alternate layouts */
foreach ( $gle_alternate_layouts as $alternate_layout ) {

if ( is_array( genesis_get_layout( $alternate_layout ) ) ) {
$layout_check = TRUE;
break;
}

} // end foreach

/**
* needles - $gle_alternate_layouts
* haystack - $genesis_layouts (keys of genesis_get_layouts())
* Return the layout check boolean:
* - TRUE if any alternate layout registered (means array of reg. layouts)
* - FALSE otherwise (means no array of reg. layouts)
*/
return ! empty( array_intersect( $gle_alternate_layouts, $genesis_layouts ) );
return $layout_check;

} // end function

Expand Down
11 changes: 9 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tags: genesis, genesiswp, genesis framework, layout, layouts, layout manager, po
Requires at least: 3.4 plus Genesis 1.8+
Tested up to: 5.0
Requires PHP: 5.6
Stable tag: 2.1.0
Stable tag: 2.1.1
License: GPL-2.0-or-later
License URI: https://opensource.org/licenses/GPL-2.0

Expand Down Expand Up @@ -373,6 +373,11 @@ Last but not least, **Special Thanks go out to my family** for allowing me to do

**NOTE for the extra Layouts** The up to nine *additional* layouts added with version 2.0.0 of the plugin back in 2013 are now deprecated as of December 2018. That means, they will NOT receive any more updates and also NO SUPPORT. You can still use them if you want but you need to care for the proper styling, displaying etc. yourself. Therefore it would make more sense for you to not use these option from the plugin but rather register custom layouts yourself and make use of our filters to bring them also into the settings drop-down field. Thanks for your understanding! - This note only regards the *additional layouts*, NOT the plugin itself of course, the plugin is alive and kickin', hehe :-).

= 🔧 2.1.1 - 2018-12-19 =
* Tweak: Fixed Fatal error caused from setting field creation function - thanks to user Pete for reporting it!
* Tweak: Fixed Admin styling glitches with Ninja Forms builder (and most likely other plugins) - Thanks to user feedback ([Topic](https://wordpress.org/support/topic/css-error-when-combined-with-ninja-forms/))


= 🎉 2.1.0 - 2018-12-18 =
* ***New: Brought the plugin back to life after more than five years, yeah! :)***
* New: Added plugin support for "Genesis Portfolio Pro" (free, by StudioPress)
Expand All @@ -395,7 +400,6 @@ Last but not least, **Special Thanks go out to my family** for allowing me to do
* Tweak: Updated `.pot` file plus all German translations (formal, informal) and German language packs
* Tweak: Removed all non-German translations from the plugin package, as those are already [powered by WordPress.org language packs](https://translate.wordpress.org/projects/wp-plugins/genesis-layout-extras) - the German translation files now serve as an example for community translators
* Tweak: Overhauled and corrected Readme.txt file here
* Tweak: All new screenshots - plus some more ;-)
* Tweak: Added new plugin icon and banner on WordPress.org
* *Trivia fact: this plugin is already 7 (seven!) years old. Whoa, that's a lot. ;-)*

Expand Down Expand Up @@ -518,6 +522,9 @@ NEW: Added support for more custom post type by plugins:

== Upgrade Notice ==

= 2.1.1 =
Major release: **Back in life :-)** - 3 new Genesis-plugins supported. Lots of improvements, tweaks and fixes. - **Update highly recommended!**

= 2.1.0 =
Major release: **Back in life :-)** - 3 new Genesis-plugins supported. Lots of improvements, tweaks and fixes. - **Update highly recommended!**

Expand Down

0 comments on commit 198bb80

Please sign in to comment.