Skip to content

Commit 182f730

Browse files
committed
v1.5.1 of the plugin
maintenance release
1 parent 5895437 commit 182f730

17 files changed

+725
-250
lines changed

CHANGES.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@
1414

1515
## Changelog of the Plugin
1616

17+
### ⚡ 1.5.1 - 2019-05-03
18+
19+
* *New: Successfully tested with WordPress 5.2*
20+
* *New: Successfully tested with ClassicPress 1.0.1*
21+
* New: Integrated with WordPress 5.2+ new Site Health feature: Builder Template Categories now has an extra section on the Debug Info tab - this is especially helpful for support requests
22+
* Tweak: Refined integration and compatibility with Toolbar Extras v1.4.3 or higher, regarding the Block Editor support
23+
* Tweak: Refined recommended Gutenberg-specific plugins for "Plugin Installer Recommendations" library
24+
* Tweak: Updated bundled library DDWlib Plugin Installer Recommendations to latest version (v1.4.0) - feature updates
25+
* Tweak: Updated `.pot` file plus all German translations (formal, informal) and language packs
26+
27+
1728
### 🎉 1.5.0 - 2019-03-28
1829

1930
* New: Added integration with theme Page Builder Framework - Custom Sections via WPBF Premium Add-On plugin (Premium, by David Vongries & MapSteps)

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
**Donate link:** https://www.paypal.me/deckerweb
1010
**Tags:** elementor, page builder, templates, gutenberg, blocks, oceanwp, astra, generatepress, genesis, categories, template, deckerweb
1111
**Requires at least:** 4.7
12-
**Tested up to:** 5.1
12+
**Tested up to:** 5.2
1313
**Requires PHP:** 5.6
14-
**Stable tag:** 1.5.0
14+
**Stable tag:** 1.5.1
1515
**License:** GPL-2.0-or-later
1616
**License URI:** https://opensource.org/licenses/GPL-2.0
1717

@@ -474,6 +474,16 @@ As of version 1.5.0 of the plugin the following was achieved:
474474

475475
## Changelog
476476

477+
### ⚡ 1.5.1 - 2019-05-03
478+
* *New: Successfully tested with WordPress 5.2*
479+
* *New: Successfully tested with ClassicPress 1.0.1*
480+
* New: Integrated with WordPress 5.2+ new Site Health feature: Builder Template Categories now has an extra section on the Debug Info tab - this is especially helpful for support requests
481+
* Tweak: Refined integration and compatibility with Toolbar Extras v1.4.3 or higher, regarding the Block Editor support
482+
* Tweak: Refined recommended Gutenberg-specific plugins for "Plugin Installer Recommendations" library
483+
* Tweak: Updated bundled library DDWlib Plugin Installer Recommendations to latest version (v1.4.0) - feature updates
484+
* Tweak: Updated `.pot` file plus all German translations (formal, informal) and language packs
485+
486+
477487
### 🎉 1.5.0 - 2019-03-28
478488
* New: Added integration with theme Page Builder Framework - Custom Sections via WPBF Premium Add-On plugin (Premium, by David Vongries & MapSteps)
479489
* New: Added integration with theme Suki - Custom Blocks via Suki Pro Add-On plugin (Premium, by SukiWP/ David Rozando)
@@ -620,6 +630,9 @@ As of version 1.5.0 of the plugin the following was achieved:
620630

621631
## Upgrade Notice
622632

633+
### 1.5.1
634+
Now with WordPress 5.2 Site Health integration. Plus few internal improvements. - **Update highly recommended!**
635+
623636
### 1.5.0
624637
Feature Release with 5 new integrations. - **Update highly recommended!** :-)
625638

@@ -683,6 +696,7 @@ Enjoy using *Builder Template Categories*? **[Please consider making a donation]
683696

684697
## 🔆 My Other Plugins
685698
* [**Toolbar Extras for Elementor - WordPress Admin Bar Enhanced**](https://wordpress.org/plugins/toolbar-extras/)
699+
* [**Toolbar Extras for Oxygen Builder - Add-On plugin**](https://wordpress.org/plugins/toolbar-extras-oxygen/)
686700
* [**Polylang Connect for Elementor – Language Switcher & Template Tweaks**](https://wordpress.org/plugins/connect-polylang-elementor/)
687701
* [**Simple Download Manager for WP Document Revisions**](https://wordpress.org/plugins/wpdr-simple-downloads/)
688702
* [Genesis What's New Info](https://wordpress.org/plugins/genesis-whats-new-info/)

builder-template-categories.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Plugin Name: Builder Template Categories
1212
* Plugin URI: https://github.com/deckerweb/builder-template-categories
1313
* Description: This plugin adds a Taxonomy "Template Category" for categorizing templates to make the life of site builders a little bit easier. It integrates with Elementor My Templates, OceanWP My Library, Astra Custom Layouts, GeneratePress Elements, Blox for Genesis, AnyWhere Elementor Global Templates and JetThemeCore My Library (Kava Pro/ CrocoBlock). These categories only appear in the WP-Admin Dashboard and only for the administrator user role (capability 'edit_theme_options').
14-
* Version: 1.5.0
14+
* Version: 1.5.1
1515
* Author: David Decker - DECKERWEB
1616
* Author URI: https://deckerweb.de/
1717
* License: GPL-2.0-or-later
@@ -40,7 +40,7 @@
4040
* @since 1.0.0
4141
*/
4242
/** Plugin version */
43-
define( 'BTC_PLUGIN_VERSION', '1.5.0' );
43+
define( 'BTC_PLUGIN_VERSION', '1.5.1' );
4444

4545
/** Plugin directory */
4646
define( 'BTC_PLUGIN_DIR', trailingslashit( dirname( __FILE__ ) ) );

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"authors": [
99
{
1010
"name": "David Decker",
11-
"homepage": "https://deckerweb.de/",
11+
"homepage": "https://deckerweb-plugins.com/",
1212
"role": "Developer"
1313
}
1414
],

includes/admin/admin-extras.php

Lines changed: 121 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,27 @@
1212
}
1313

1414

15+
/**
16+
* Remove unethical Jetpack search results Ads as no one needs these anyway.
17+
* Additionally remove other promotions and Ads from Jetpack.
18+
*
19+
* @link https://wptavern.com/jetpack-7-1-adds-feature-suggestions-to-plugin-search-results#comment-284531
20+
*
21+
* @since 1.6.0
22+
*/
23+
add_filter( 'jetpack_show_promotions', '__return_false', 20 );
24+
add_filter( 'can_display_jetpack_manage_notice', '__return_false', 20 );
25+
add_filter( 'jetpack_just_in_time_msgs', '__return_false', 20 );
26+
27+
28+
/**
29+
* Remove unethical WooCommerce Ads injections.
30+
*
31+
* @since 1.6.0
32+
*/
33+
add_filter( 'woocommerce_allow_marketplace_suggestions', '__return_false' );
34+
35+
1536
/**
1637
* Add "Custom Taxonomy" link to Plugins page.
1738
*
@@ -154,6 +175,104 @@ function ddw_btc_admin_footer_text( $footer_text ) {
154175
} // end function
155176

156177

178+
add_filter( 'debug_information', 'ddw_btc_site_health_add_debug_info', 12 );
179+
/**
180+
* Add additional plugin related info to the Site Health Debug Info section.
181+
* (Only relevant for WordPress 5.2 or higher)
182+
*
183+
* @link https://make.wordpress.org/core/2019/04/25/site-health-check-in-5-2/
184+
*
185+
* @since 1.5.1
186+
*
187+
* @uses ddw_btc_get_integrations()
188+
* @uses ddw_btc_tax_edit_info_content()
189+
*
190+
* @param array $debug_info Array holding all Debug Info items.
191+
* @return array Modified array of Debug Info.
192+
*/
193+
function ddw_btc_site_health_add_debug_info( $debug_info ) {
194+
195+
/** Get all integrations */
196+
$get_integrations = ddw_btc_get_integrations();
197+
$integrations_output = '';
198+
199+
/** Collect string for each active integration */
200+
foreach ( $get_integrations as $integration => $integration_data ) {
201+
202+
if ( 'default-none' !== $integration ) {
203+
204+
$integrations_output .= sprintf(
205+
'%1$s (%2$s), ',
206+
esc_html( $integration_data[ 'label' ] ),
207+
sanitize_key( $integration_data[ 'post_type' ] )
208+
);
209+
210+
} // end if
211+
212+
} // end foreach
213+
214+
/** Setup strings */
215+
$string_enabled = __( 'Enabled', 'builder-template-categories' );
216+
$string_disabled = __( 'Disabled', 'builder-template-categories' );
217+
218+
$block_editor_cpt_ui = apply_filters( 'btc/filter/wp_block/post_type_ui', TRUE );
219+
220+
/** Add our Debug info */
221+
$debug_info[ 'builder-template-categories' ] = array(
222+
'label' => esc_html__( 'Builder Template Categories', 'builder-template-categories' ) . ' (' . esc_html__( 'Plugin', 'builder-template-categories' ) . ')',
223+
'fields' => array(
224+
'btc_plugin_version' => array(
225+
'label' => __( 'Plugin version', 'builder-template-categories' ),
226+
'value' => BTC_PLUGIN_VERSION,
227+
),
228+
'current_active_integrations' => array(
229+
'label' => __( 'Current active integrations', 'builder-template-categories' ),
230+
'value' => $integrations_output,
231+
),
232+
'wpblock_post_type_ui' => array(
233+
'label' => __( 'Reusable Blocks Post Type UI', 'builder-template-categories' ),
234+
'value' => ( $block_editor_cpt_ui ) ? $string_enabled : $string_disabled,
235+
),
236+
),
237+
);
238+
239+
/** Return modified Debug Info array */
240+
return $debug_info;
241+
242+
} // end function
243+
244+
245+
if ( ! function_exists( 'ddw_wp_site_health_remove_percentage' ) ) :
246+
247+
add_action( 'admin_head', 'ddw_wp_site_health_remove_percentage', 100 );
248+
/**
249+
* Remove the "Percentage Progress" display in Site Health feature as this will
250+
* get users obsessed with fullfilling a 100% where there are non-problems!
251+
*
252+
* @link https://make.wordpress.org/core/2019/04/25/site-health-check-in-5-2/
253+
*
254+
* @since 1.5.1
255+
*/
256+
function ddw_wp_site_health_remove_percentage() {
257+
258+
/** Bail early if not on WP 5.2+ */
259+
if ( version_compare( $GLOBALS[ 'wp_version' ], '5.2-beta', '<' ) ) {
260+
return;
261+
}
262+
263+
?>
264+
<style type="text/css">
265+
.site-health-progress {
266+
display: none;
267+
}
268+
</style>
269+
<?php
270+
271+
} // end function
272+
273+
endif;
274+
275+
157276
/**
158277
* Inline CSS fix for Plugins page update messages.
159278
*
@@ -305,12 +424,12 @@ function ddw_btc_register_extra_plugin_recommendations( array $plugins ) {
305424
if ( ddw_btc_is_block_editor_active() && ddw_btc_is_block_editor_wanted() ) {
306425

307426
$plugins_block_editor = array(
308-
'classic-editor' => array(
427+
'ultimate-addons-for-gutenberg' => array(
309428
'featured' => 'yes',
310429
'recommended' => 'yes',
311430
'popular' => 'yes',
312431
),
313-
'classic-editor-addon' => array(
432+
'kadence-blocks' => array(
314433
'featured' => 'yes',
315434
'recommended' => 'yes',
316435
'popular' => 'yes',
@@ -340,11 +459,6 @@ function ddw_btc_register_extra_plugin_recommendations( array $plugins ) {
340459
'recommended' => 'yes',
341460
'popular' => 'no',
342461
),
343-
'custom-fields-gutenberg' => array(
344-
'featured' => 'yes',
345-
'recommended' => 'yes',
346-
'popular' => 'no',
347-
),
348462
);
349463

350464
} // end if

includes/admin/admin-help.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@
1616
* Help content when on adding/edit our Taxonomy terms.
1717
*
1818
* @since 1.0.0
19+
* @since 1.5.1 Added return/ echo logic.
20+
*
21+
* @param string $render Flag string to optionally echo string (not returning).
22+
* @return string Echo or return string & markup with list of integrations.
1923
*/
20-
function ddw_btc_tax_edit_info_content() {
24+
function ddw_btc_tax_edit_info_content( $render = 'echo' ) {
2125

2226
$output = '<div class="notice notice-info">';
2327

@@ -49,7 +53,11 @@ function ddw_btc_tax_edit_info_content() {
4953
$output .= '</ul>';
5054
$output .= '</div>';
5155

52-
echo $output;
56+
if ( 'echo' === sanitize_key( $render ) ) {
57+
echo $output;
58+
}
59+
60+
return $output;
5361

5462
} // end function
5563

0 commit comments

Comments
 (0)