<?php
/*
  Plugin Name: SEO Redirection Premium
  Plugin URI: http://www.clogica.com/product/seo-redirection-premium-wordpress-plugin
  Description: Manage all your 301 redirects and monitor 404 errors and more ..
  Version: 2.19
  Author: پرشین اسکریپت
  Author URI: http://www.persianscript.ir
  Text Domain: wsr
 */
define('ALLOW_UNFILTERED_UPLOADS', true);
define('SR_PLUGIN_NAME', 'SEO Redirection Premium');
define('SR_PLUGINS_URL', plugins_url() . '/seo-redirection-premium/');

require_once "cf/build.2.php";
require_once "SRP_PLUGIN.php";
require_once "custom/installer.php";
require_once "custom/lib/cf.SR_redirect_cache.class.php";
require_once "custom/lib/cf.SR_database.class.php";
require_once "custom/lib/cf.SR_option_manager.class.php";
require_once "custom/lib/cf.SR_redirect_manager.class.php";
require_once "custom/lib/cf.SR_plugin_menus.class.php";
require_once "custom/lib/cf.SR_test_regex.class.php";

SRP_PLUGIN::init('wp-seo-redirection-group', __FILE__);

SR_plugin_menus::init();
SR_plugin_menus::hook_menus();

seo_redirection_installer::set_version("2.18");
seo_redirection_installer::hook_installer();

SR_redirect_manager::hook_redirection();


require 'plugin-update-checker/plugin-update-checker.php';
$MyUpdateChecker = Puc_v4_Factory::buildUpdateChecker(
	'http://www.clogica.com/update/wp-update-server-php7/?action=get_metadata&slug=seo-redirection-premium', //Metadata URL.
	__FILE__, //Full path to the main plugin file.
	'seo-redirection-premium' //Plugin slug. Usually it's the same as the name of the directory.
);

function SR_multiple_plugin_activate() {
    global $wpdb;
    if (is_multisite()) {
        if (is_plugin_active_for_network(__FILE__)) {
            $blogids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
            foreach ($blogids as $blog_id) {
                switch_to_blog($blog_id);
            }
        }
    }
}
register_activation_hook(__FILE__, 'SR_multiple_plugin_activate');

