<status>Service unavailable.</status>';
      exit;
    }
  }

  public function mtnc_template_include($original_template)
  {
    $original_template = mtnc_load_maintenance_page($original_template);
    return $original_template;
  }

  public function mtnc_admin_bar()
  {
    add_action('admin_bar_menu', 'mtnc_add_toolbar_items', 100);
  }

  function is_plugin_installed($slug)
  {
    if (!function_exists('get_plugins')) {
      require_once ABSPATH . 'wp-admin/includes/plugin.php';
    }
    $all_plugins = get_plugins();

    if (!empty($all_plugins[$slug])) {
      return true;
    } else {
      return false;
    }
  } // is_plugin_installed

  // auto download / install / activate WP Force SSL plugin
  function install_wpfssl()
  {
    check_ajax_referer('install_wpfssl');

    if (false === current_user_can('administrator')) {
      wp_die('Sorry, you have to be an admin to run this action.');
    }

    $plugin_slug = 'wp-force-ssl/wp-force-ssl.php';
    $plugin_zip = 'https://downloads.wordpress.org/plugin/wp-force-ssl.latest-stable.zip';

    @include_once ABSPATH . 'wp-admin/includes/plugin.php';
    @include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
    @include_once ABSPATH . 'wp-admin/includes/plugin-install.php';
    @include_once ABSPATH . 'wp-admin/includes/file.php';
    @include_once ABSPATH . 'wp-admin/includes/misc.php';
    echo '<style>
		body{
			font-family: sans-serif;
			font-size: 14px;
			line-height: 1.5;
			color: #444;
		}
		</style>';

    echo '<div style="margin: 20px; color:#444;">';
    echo 'If things are not done in a minute <a target="_parent" href="' . admin_url('plugin-install.php?s=force%20ssl%20webfactory&tab=search&type=term') . '">install the plugin manually via Plugins page</a><br><br>';
    echo 'Starting ...<br><br>';

    wp_cache_flush();
    $upgrader = new Plugin_Upgrader();
    echo 'Check if WP Force SSL is already installed ... <br />';
    if ($this->is_plugin_installed($plugin_slug)) {
      echo 'WP Force SSL is already installed! <br /><br />Making sure it\'s the latest version.<br />';
      $upgrader->upgrade($plugin_slug);
      $installed = true;
    } else {
      echo 'Installing WP Force SSL.<br />';
      $installed = $upgrader->install($plugin_zip);
    }
    wp_cache_flush();

    if (!is_wp_error($installed) && $installed) {
      echo 'Activating WP Force SSL.<br />';
      $activate = activate_plugin($plugin_slug);

      if (is_null($activate)) {
        echo 'WP Force SSL Activated.<br />';

        echo '<script>setTimeout(function() { top.location = "admin.php?page=maintenance"; }, 1000);</script>';
        echo '<br>If you are not redirected in a few seconds - <a href="admin.php?page=maintenance" target="_parent">click here</a>.';
      }
    } else {
      echo 'Could not install WP Force SSL. You\'ll have to <a target="_parent" href="' . admin_url('plugin-install.php?s=force%20ssl%20webfactory&tab=search&type=term') . '">download and install manually</a>.';
    }

    echo '</div>';
  } // install_wpfssl

} // class MTNC

global $mtnc;
$mtnc = new MTNC();
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://cwminformatica.net/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://cwminformatica.net/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://cwminformatica.net/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://cwminformatica.net/wp-sitemap-posts-e-landing-page-1.xml</loc></sitemap><sitemap><loc>https://cwminformatica.net/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://cwminformatica.net/wp-sitemap-taxonomies-astra-portfolio-categories-1.xml</loc></sitemap><sitemap><loc>https://cwminformatica.net/wp-sitemap-taxonomies-astra-portfolio-other-categories-1.xml</loc></sitemap><sitemap><loc>https://cwminformatica.net/wp-sitemap-users-1.xml</loc></sitemap></sitemapindex>
