Skip to content

Commit

Permalink
Disable the Redux framework Gutenberg block library by default
Browse files Browse the repository at this point in the history
  • Loading branch information
flakas committed Nov 28, 2021
1 parent f819444 commit 47df99c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Yes, directly on <a href="https://github.com/kgjerstad/wp-mail-logging/" rel="no
- Updated: Redux framework version to 4.3.4.
- Fixed: "disable_demo" PHP error. Thanks @Mike00mike!
- Fixed: changelog date typos. Thanks @Spreeuw!
- Removed: the Redux framework Gutenberg Library blocks and the Settings page. Thanks @Helenel!
- Removed: the Redux framework Gutenberg Library blocks. Thanks @Helenel!

= 1.10.1 - 2021-11-24 =
- Removed: Redux Framework connection notice. Thanks Jesse!
Expand Down
11 changes: 11 additions & 0 deletions src/WPML_LifeCycle.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,15 @@ public function uninstall() {
* @return void
*/
public function upgrade() {
$this->disableReduxFunctionality();
}

/**
* See: http://plugin.michael-simpson.com/?page_id=105
* @return void
*/
public function activate() {
$this->disableReduxFunctionality();
}

/**
Expand Down Expand Up @@ -208,4 +210,13 @@ public function registerPluginActionLinks( $actions, $plugin_file ) {
return $actions;
}

// Disable unnecessary Redux Framework functionality
public function disableReduxFunctionality() {
// Disable the default Redux and Extendify Gutenberg block library
update_option( 'use_redux_templates', '' );
update_option( 'use_extendify_templates', '' );

// Disable the Redux activation banner
update_option( 'redux-framework_tracking_notice', 'hide' );
}
}
11 changes: 0 additions & 11 deletions src/inc/redux/WPML_Redux_Framework_config.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,6 @@ public function initSettings() {
if ( method_exists( "Redux", "disable_demo" ) ) {
\Redux::disable_demo();
}

// Disable the default Redux and Extendify Gutenberg block library
if ( class_exists( "Redux_Core" ) && property_exists( "Redux_Core", "redux_templates_enabled" ) ) {
\Redux_Core::$redux_templates_enabled = false;
}
if ( class_exists( "Redux_Core" ) && property_exists( "Redux_Core", "extendify_templates_enabled" ) ) {
\Redux_Core::$extendify_templates_enabled = false;
}

// Disable the Redux activation banner
update_option( 'redux-framework_tracking_notice', 'hide' );
}

// Remove the demo link and the notice of integrated demo from the redux-framework plugin
Expand Down

0 comments on commit 47df99c

Please sign in to comment.