Skip to content

Commit

Permalink
v1.5.1 of the plugin
Browse files Browse the repository at this point in the history
maintenance release
  • Loading branch information
deckerweb committed May 4, 2019
1 parent 5895437 commit 182f730
Show file tree
Hide file tree
Showing 17 changed files with 725 additions and 250 deletions.
11 changes: 11 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@

## Changelog of the Plugin

### ⚡ 1.5.1 - 2019-05-03

* *New: Successfully tested with WordPress 5.2*
* *New: Successfully tested with ClassicPress 1.0.1*
* 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
* Tweak: Refined integration and compatibility with Toolbar Extras v1.4.3 or higher, regarding the Block Editor support
* Tweak: Refined recommended Gutenberg-specific plugins for "Plugin Installer Recommendations" library
* Tweak: Updated bundled library DDWlib Plugin Installer Recommendations to latest version (v1.4.0) - feature updates
* Tweak: Updated `.pot` file plus all German translations (formal, informal) and language packs


### 🎉 1.5.0 - 2019-03-28

* New: Added integration with theme Page Builder Framework - Custom Sections via WPBF Premium Add-On plugin (Premium, by David Vongries & MapSteps)
Expand Down
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
**Donate link:** https://www.paypal.me/deckerweb
**Tags:** elementor, page builder, templates, gutenberg, blocks, oceanwp, astra, generatepress, genesis, categories, template, deckerweb
**Requires at least:** 4.7
**Tested up to:** 5.1
**Tested up to:** 5.2
**Requires PHP:** 5.6
**Stable tag:** 1.5.0
**Stable tag:** 1.5.1
**License:** GPL-2.0-or-later
**License URI:** https://opensource.org/licenses/GPL-2.0

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

## Changelog

### ⚡ 1.5.1 - 2019-05-03
* *New: Successfully tested with WordPress 5.2*
* *New: Successfully tested with ClassicPress 1.0.1*
* 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
* Tweak: Refined integration and compatibility with Toolbar Extras v1.4.3 or higher, regarding the Block Editor support
* Tweak: Refined recommended Gutenberg-specific plugins for "Plugin Installer Recommendations" library
* Tweak: Updated bundled library DDWlib Plugin Installer Recommendations to latest version (v1.4.0) - feature updates
* Tweak: Updated `.pot` file plus all German translations (formal, informal) and language packs


### 🎉 1.5.0 - 2019-03-28
* New: Added integration with theme Page Builder Framework - Custom Sections via WPBF Premium Add-On plugin (Premium, by David Vongries & MapSteps)
* New: Added integration with theme Suki - Custom Blocks via Suki Pro Add-On plugin (Premium, by SukiWP/ David Rozando)
Expand Down Expand Up @@ -620,6 +630,9 @@ As of version 1.5.0 of the plugin the following was achieved:

## Upgrade Notice

### 1.5.1
Now with WordPress 5.2 Site Health integration. Plus few internal improvements. - **Update highly recommended!**

### 1.5.0
Feature Release with 5 new integrations. - **Update highly recommended!** :-)

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

## 🔆 My Other Plugins
* [**Toolbar Extras for Elementor - WordPress Admin Bar Enhanced**](https://wordpress.org/plugins/toolbar-extras/)
* [**Toolbar Extras for Oxygen Builder - Add-On plugin**](https://wordpress.org/plugins/toolbar-extras-oxygen/)
* [**Polylang Connect for Elementor – Language Switcher & Template Tweaks**](https://wordpress.org/plugins/connect-polylang-elementor/)
* [**Simple Download Manager for WP Document Revisions**](https://wordpress.org/plugins/wpdr-simple-downloads/)
* [Genesis What's New Info](https://wordpress.org/plugins/genesis-whats-new-info/)
Expand Down
4 changes: 2 additions & 2 deletions builder-template-categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Plugin Name: Builder Template Categories
* Plugin URI: https://github.com/deckerweb/builder-template-categories
* 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').
* Version: 1.5.0
* Version: 1.5.1
* Author: David Decker - DECKERWEB
* Author URI: https://deckerweb.de/
* License: GPL-2.0-or-later
Expand Down Expand Up @@ -40,7 +40,7 @@
* @since 1.0.0
*/
/** Plugin version */
define( 'BTC_PLUGIN_VERSION', '1.5.0' );
define( 'BTC_PLUGIN_VERSION', '1.5.1' );

/** Plugin directory */
define( 'BTC_PLUGIN_DIR', trailingslashit( dirname( __FILE__ ) ) );
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"authors": [
{
"name": "David Decker",
"homepage": "https://deckerweb.de/",
"homepage": "https://deckerweb-plugins.com/",
"role": "Developer"
}
],
Expand Down
128 changes: 121 additions & 7 deletions includes/admin/admin-extras.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,27 @@
}


/**
* Remove unethical Jetpack search results Ads as no one needs these anyway.
* Additionally remove other promotions and Ads from Jetpack.
*
* @link https://wptavern.com/jetpack-7-1-adds-feature-suggestions-to-plugin-search-results#comment-284531
*
* @since 1.6.0
*/
add_filter( 'jetpack_show_promotions', '__return_false', 20 );
add_filter( 'can_display_jetpack_manage_notice', '__return_false', 20 );
add_filter( 'jetpack_just_in_time_msgs', '__return_false', 20 );


/**
* Remove unethical WooCommerce Ads injections.
*
* @since 1.6.0
*/
add_filter( 'woocommerce_allow_marketplace_suggestions', '__return_false' );


/**
* Add "Custom Taxonomy" link to Plugins page.
*
Expand Down Expand Up @@ -154,6 +175,104 @@ function ddw_btc_admin_footer_text( $footer_text ) {
} // end function


add_filter( 'debug_information', 'ddw_btc_site_health_add_debug_info', 12 );
/**
* Add additional plugin related info to the Site Health Debug Info section.
* (Only relevant for WordPress 5.2 or higher)
*
* @link https://make.wordpress.org/core/2019/04/25/site-health-check-in-5-2/
*
* @since 1.5.1
*
* @uses ddw_btc_get_integrations()
* @uses ddw_btc_tax_edit_info_content()
*
* @param array $debug_info Array holding all Debug Info items.
* @return array Modified array of Debug Info.
*/
function ddw_btc_site_health_add_debug_info( $debug_info ) {

/** Get all integrations */
$get_integrations = ddw_btc_get_integrations();
$integrations_output = '';

/** Collect string for each active integration */
foreach ( $get_integrations as $integration => $integration_data ) {

if ( 'default-none' !== $integration ) {

$integrations_output .= sprintf(
'%1$s (%2$s), ',
esc_html( $integration_data[ 'label' ] ),
sanitize_key( $integration_data[ 'post_type' ] )
);

} // end if

} // end foreach

/** Setup strings */
$string_enabled = __( 'Enabled', 'builder-template-categories' );
$string_disabled = __( 'Disabled', 'builder-template-categories' );

$block_editor_cpt_ui = apply_filters( 'btc/filter/wp_block/post_type_ui', TRUE );

/** Add our Debug info */
$debug_info[ 'builder-template-categories' ] = array(
'label' => esc_html__( 'Builder Template Categories', 'builder-template-categories' ) . ' (' . esc_html__( 'Plugin', 'builder-template-categories' ) . ')',
'fields' => array(
'btc_plugin_version' => array(
'label' => __( 'Plugin version', 'builder-template-categories' ),
'value' => BTC_PLUGIN_VERSION,
),
'current_active_integrations' => array(
'label' => __( 'Current active integrations', 'builder-template-categories' ),
'value' => $integrations_output,
),
'wpblock_post_type_ui' => array(
'label' => __( 'Reusable Blocks Post Type UI', 'builder-template-categories' ),
'value' => ( $block_editor_cpt_ui ) ? $string_enabled : $string_disabled,
),
),
);

/** Return modified Debug Info array */
return $debug_info;

} // end function


if ( ! function_exists( 'ddw_wp_site_health_remove_percentage' ) ) :

add_action( 'admin_head', 'ddw_wp_site_health_remove_percentage', 100 );
/**
* Remove the "Percentage Progress" display in Site Health feature as this will
* get users obsessed with fullfilling a 100% where there are non-problems!
*
* @link https://make.wordpress.org/core/2019/04/25/site-health-check-in-5-2/
*
* @since 1.5.1
*/
function ddw_wp_site_health_remove_percentage() {

/** Bail early if not on WP 5.2+ */
if ( version_compare( $GLOBALS[ 'wp_version' ], '5.2-beta', '<' ) ) {
return;
}

?>
<style type="text/css">
.site-health-progress {
display: none;
}
</style>
<?php

} // end function

endif;


/**
* Inline CSS fix for Plugins page update messages.
*
Expand Down Expand Up @@ -305,12 +424,12 @@ function ddw_btc_register_extra_plugin_recommendations( array $plugins ) {
if ( ddw_btc_is_block_editor_active() && ddw_btc_is_block_editor_wanted() ) {

$plugins_block_editor = array(
'classic-editor' => array(
'ultimate-addons-for-gutenberg' => array(
'featured' => 'yes',
'recommended' => 'yes',
'popular' => 'yes',
),
'classic-editor-addon' => array(
'kadence-blocks' => array(
'featured' => 'yes',
'recommended' => 'yes',
'popular' => 'yes',
Expand Down Expand Up @@ -340,11 +459,6 @@ function ddw_btc_register_extra_plugin_recommendations( array $plugins ) {
'recommended' => 'yes',
'popular' => 'no',
),
'custom-fields-gutenberg' => array(
'featured' => 'yes',
'recommended' => 'yes',
'popular' => 'no',
),
);

} // end if
Expand Down
12 changes: 10 additions & 2 deletions includes/admin/admin-help.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@
* Help content when on adding/edit our Taxonomy terms.
*
* @since 1.0.0
* @since 1.5.1 Added return/ echo logic.
*
* @param string $render Flag string to optionally echo string (not returning).
* @return string Echo or return string & markup with list of integrations.
*/
function ddw_btc_tax_edit_info_content() {
function ddw_btc_tax_edit_info_content( $render = 'echo' ) {

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

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

echo $output;
if ( 'echo' === sanitize_key( $render ) ) {
echo $output;
}

return $output;

} // end function

Expand Down
Loading

0 comments on commit 182f730

Please sign in to comment.