blogid; } if ( $blog_id ) { switch_to_blog( $blog_id ); update_option( '_wpml_inactive', true ); restore_current_blog(); } wp_redirect( network_admin_url( 'admin.php?page=' . WPML_PLUGIN_FOLDER . '/menu/network.php&updated=true&action=deactivatewpml' ) ); } function icl_network_activate_wpml( $blog_id = false ) { global $wpdb; $filtered_action = filter_input( INPUT_POST, 'action', FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_NULL_ON_FAILURE ); $filtered_action = $filtered_action ? $filtered_action : filter_input( INPUT_GET, 'action', FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_NULL_ON_FAILURE ); if ( 0 === strcmp( $filtered_action, 'activatewpml' ) ) { if ( empty( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'activatewpml' ) ) { return; } } if ( empty( $blog_id ) ) { $filtered_id = filter_input( INPUT_POST, 'id', FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_NULL_ON_FAILURE ); $filtered_id = $filtered_id ? $filtered_id : filter_input( INPUT_GET, 'id', FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_NULL_ON_FAILURE ); $blog_id = $filtered_id !== false ? $filtered_id : $wpdb->blogid; } if ( $blog_id ) { switch_to_blog( $blog_id ); delete_option( '_wpml_inactive' ); restore_current_blog(); } wp_redirect( network_admin_url( 'admin.php?page=' . WPML_PLUGIN_FOLDER . '/menu/network.php&updated=true&action=activatewpml' ) ); exit(); }