Skip to content

Commit

Permalink
1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
webmandesign committed Apr 23, 2019
1 parent d1748dd commit 4fcc912
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 16 deletions.
2 changes: 1 addition & 1 deletion assets/css/base.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/sass/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// @copyright WebMan Design, Oliver Juhas
//
// @since 1.0.0
// @version 1.0.0
// @version 1.0.1
//

$left: left;
Expand Down
10 changes: 5 additions & 5 deletions assets/sass/parts/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ html {
font-family:
-apple-system,
BlinkMacSystemFont,
Segoe UI,
'Segoe UI',
Helvetica,
Arial,
sans-serif,
Apple Color Emoji,
Segoe UI Emoji,
Segoe UI Symbol;
'Apple Color Emoji',
'Segoe UI Emoji',
'Segoe UI Symbol';
}

pre, code, kbd, tt, var {
font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
font-family: Monaco, Consolas, 'Andale Mono', 'DejaVu Sans Mono', monospace;
font-size: .9375rem;
}

Expand Down
17 changes: 17 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Playground for Beaver Themer Changelog

## 1.0.1

* **Fix**: CSS font family values
* **Fix**: Making the theme work with Beaver Builder pages/posts

### Files changed:

changelog.md
index.php
style.css
assets/css/base.css
assets/sass/base.scss
assets/sass/parts/_typography.scss
includes/class-setup-plugin.php
templates/parts/content/content.php


## 1.0.0

* Initial release.
45 changes: 38 additions & 7 deletions includes/class-setup-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,45 +6,76 @@
* @copyright WebMan Design, Oliver Juhas
*
* @since 1.0.0
* @version 1.0.0
* @version 1.0.1
*/
class PfBT_Setup_Plugin {

/**
* Initialization.
*
* @since 1.0.0
* @version 1.0.0
* @version 1.0.1
*/
public static function init() {
add_action( 'pfbt_content', __CLASS__ . '::notice' );
add_action( 'pfbt_content', __CLASS__ . '::content' );

add_filter( 'fl_theme_builder_part_hooks', __CLASS__ . '::parts' );
add_filter( 'fl_builder_upgrade_url', __CLASS__ . '::url' );
}

/**
* Is builder active or enabled?
*
* @since 1.0.1
* @version 1.0.1
*/
public static function is_builder() {
if (
! is_callable( 'FLBuilderModel::is_builder_active' )
|| ! is_callable( 'FLBuilderModel::is_builder_enabled' )
) {
return false;
}

return FLBuilderModel::is_builder_active() || FLBuilderModel::is_builder_enabled();
}

/**
* Front-end notice.
*
* This is displayed only when WordPress found posts
* but there is no Beaver Themer layout to display.
*
* @since 1.0.0
* @version 1.0.0
* @version 1.0.1
*/
public static function notice() {
if ( ! class_exists( 'FLThemeBuilder' ) ) {
// Beaver Themer not active?
get_template_part( 'templates/parts/content/content', 'beaver-themer' );
} else if (
! is_callable( 'FLBuilderModel::is_builder_active' )
|| ! FLBuilderModel::is_builder_active()
) {
} else if ( ! self::is_builder() ) {
// Looks like we have no Themer Layouts...
get_template_part( 'templates/parts/content/content', 'themer-layouts' );
}
}

/**
* Display page builder layout if it exists.
*
* Allows displaying custom page builder layout if it exists,
* such as pages built with Beaver Builder. This will bypass
* the Beaver Themer layout.
*
* @since 1.0.1
* @version 1.0.1
*/
public static function content() {
if ( self::is_builder() ) {
get_template_part( 'templates/parts/content/content', get_post_type() );
}
}

/**
* Registers hooks for theme parts.
*
Expand Down
3 changes: 2 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* @copyright WebMan Design, Oliver Juhas
*
* @since 1.0.0
* @version 1.0.0
* @version 1.0.1
*/

get_header();
Expand All @@ -27,6 +27,7 @@
* this content is being displayed instead.
*
* `PfBT_Setup_Plugin::notice()` is hooked here.
* `PfBT_Setup_Plugin::content()` is hooked here.
* Not included in Beaver Themer part hooks, no need to.
*
* @since 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Theme Name: Playground for Beaver Themer
Theme URI: https://github.com/webmandesign/playground-for-beaver-themer/
Author: WebMan Design
Author URI: https://www.webmandesign.eu/
Version: 1.0.0
Version: 1.0.1
Text Domain: playground-for-beaver-themer
Domain Path: /languages
License: GNU General Public License v3
Expand Down
17 changes: 17 additions & 0 deletions templates/parts/content/content.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php defined( 'ABSPATH' ) || exit;
/**
* Page builder content.
*
* @package Playground for Beaver Themer
* @copyright WebMan Design, Oliver Juhas
*
* @since 1.0.1
* @version 1.0.1
*/

while ( have_posts() ) :
the_post();

the_content();

endwhile;

0 comments on commit 4fcc912

Please sign in to comment.