Skip to content

Commit

Permalink
Merge pull request #466 from Codeinwp/bugfix/465
Browse files Browse the repository at this point in the history
Fixed load textdomain issue with WP 6.7
  • Loading branch information
vytisbulkevicius authored Jan 8, 2025
2 parents 52cccf1 + c4b35ad commit 05ec776
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions includes/classes/wp-maintenance-mode-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,8 @@ class WP_Maintenance_Mode_Admin {
* 3, 2, 1... Start!
*/
private function __construct() {
$plugin = WP_Maintenance_Mode::get_instance();
$this->plugin_slug = $plugin->get_plugin_slug();
$this->plugin_settings = $plugin->get_plugin_settings();
$this->plugin_network_settings = $plugin->get_plugin_network_settings();
$this->plugin_default_settings = $plugin->default_settings();
$this->plugin_basename = plugin_basename( WPMM_PATH . $this->plugin_slug . '.php' );
// Init.
add_action( 'init', array( $this, 'load_default_settings' ) );

// Load admin style sheet and JavaScript.
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) );
Expand Down Expand Up @@ -95,6 +91,18 @@ public static function get_instance() {
return self::$instance;
}

/**
* Load default settings.
*/
public function load_default_settings() {
$plugin = WP_Maintenance_Mode::get_instance();
$this->plugin_slug = $plugin->get_plugin_slug();
$this->plugin_settings = $plugin->get_plugin_settings();
$this->plugin_network_settings = $plugin->get_plugin_network_settings();
$this->plugin_basename = plugin_basename( WPMM_PATH . $this->plugin_slug . '.php' );
$this->plugin_default_settings = $plugin->default_settings();
}

/**
* Load CSS files
*
Expand Down

0 comments on commit 05ec776

Please sign in to comment.