includes/class-freemius.php
function skip_connection( $sites = null, $skip_all_network = false ) {
            $this->_logger->entrance();

            $this->_admin_notices->remove_sticky( 'connect_account' );

            if ( $skip_all_network ) {
                $this->set_anonymous_mode( true, true );
            }

            if ( ! $skip_all_network && empty( $sites ) ) {
                $this->skip_site_connection();
            } else {
                $uids = array();

                if ( $skip_all_network ) {
                    $this->set_anonymous_mode( true, true );

                    $sites = self::get_sites();
                    foreach ( $sites as $site ) {
                        $blog_id = self::get_site_blog_id( $site );
                        $this->skip_site_connection( $blog_id, false );
                        $uids[] = $this->get_anonymous_id( $blog_id );
                    }
                } else if ( ! empty( $sites ) ) {
                    foreach ( $sites as $site ) {
                        $uids[] = $site['uid'];
                        $this->skip_site_connection( $site['blog_id'], false );
                    }
                }

                // Send anonymous skip event.
                // No user identified info nor any tracking will be sent after the user skips the opt-in.
                $this->get_api_plugin_scope()->call( 'skip.json', 'put', array(
                    'uids' => $uids,
                ) );
            }

            $this->network_upgrade_mode_completed();
        }
function skip_connection( $sites = null, $skip_all_network = false ) {
            $this->_logger->entrance();

            $this->_admin_notices->remove_sticky( 'connect_account' );

            if ( $skip_all_network ) {
                $this->set_anonymous_mode( true, true );
            }

            if ( ! $skip_all_network && empty( $sites ) ) {
                $this->skip_site_connection();
            } else {
                $uids = array();

                if ( $skip_all_network ) {
                    $this->set_anonymous_mode( true, true );

                    $sites = self::get_sites();
                    foreach ( $sites as $site ) {
                        $blog_id = self::get_site_blog_id( $site );
                        $this->skip_site_connection( $blog_id, false );
                        $uids[] = $this->get_anonymous_id( $blog_id );
                    }
                } else if ( ! empty( $sites ) ) {
                    foreach ( $sites as $site ) {
                        $uids[] = $site['uid'];
                        $this->skip_site_connection( $site['blog_id'], false );
                    }
                }

                // Send anonymous skip event.
                // No user identified info nor any tracking will be sent after the user skips the opt-in.
                $this->get_api_plugin_scope()->call( 'skip.json', 'put', array(
                    'uids' => $uids,
                ) );
            }

            $this->network_upgrade_mode_completed();
        }
function skip_connection ( $ sites = null , $ skip_all_network = false ) { $ this -> _logger -> entrance ( ) ; $ this -> _admin_notices -> remove_sticky ( 'connect_account' ) ; if ( $ skip_all_network ) { $ this -> set_anonymous_mode ( true , true ) ; } if ( ! $ skip_all_network && empty ( $ sites ) ) { $ this -> skip_site_connection ( ) ; } else { $ uids = array ( ) ; if ( $ skip_all_network ) { $ this -> set_anonymous_mode ( true , true ) ; $ sites = self :: get_sites ( ) ; foreach ( $ sites as $ site ) { $ blog_id = self :: get_site_blog_id ( $ site ) ; $ this -> skip_site_connection ( $ blog_id , false ) ; $ uids [ ] = $ this -> get_anonymous_id ( $ blog_id ) ; } } else if ( ! empty ( $ sites ) ) { foreach ( $ sites as $ site ) { $ uids [ ] = $ site [ 'uid' ] ; $ this -> skip_site_connection ( $ site [ 'blog_id' ] , false ) ; } } // Send anonymous skip event.
 // No user identified info nor any tracking will be sent after the user skips the opt-in.
 $ this -> get_api_plugin_scope ( ) -> call ( 'skip.json' , 'put' , array ( 'uids' => $ uids , ) ) ; } $ this -> network_upgrade_mode_completed ( ) ; }
Skip account connect, and set anonymous mode.

@author Vova Feldman (@svovaf)
@since  1.1.1

@param array|null $sites            Since 2.0.0. Specific sites.
@param bool       $skip_all_network Since 2.0.0. If true, skip connection for all sites.
Skip account connect and set anonymous mode .