src/Controller.php
/**
     *  Make a non-blocking POST request to run wp2staticProcessQueue.
     */
Make a non-blocking POST request to run wp2staticProcessQueue.
Make a non - blocking POST request to run wp2staticProcessQueue .
public static function wp2staticProcessQueueAdminPost() : void {
        $url = admin_url( 'admin-post.php' ) . '?action=wp2static_process_queue';
        $nonce = wp_create_nonce( 'wp2static_process_queue' );
        $result = wp_remote_post(
            $url,
            [
                'blocking' => false,
                'body' => [ '_wpnonce' => $nonce ],
                'cookies' => $_COOKIE,
                'sslverify' => false,
                'timeout' => 0.01,
            ]
        );
        if ( is_wp_error( $result ) ) {
            WsLog::l(
                'Error in wp2staticProcessQueueAdminPost. Request to admin-post.php failed: ' .
                json_encode( $result->errors )
            );
        }
    }
public static function wp2staticProcessQueueAdminPost ( ) : void { $ url = admin_url ( 'admin-post.php' ) . '?action=wp2static_process_queue' ; $ nonce = wp_create_nonce ( 'wp2static_process_queue' ) ; $ result = wp_remote_post ( $ url , [ 'blocking' => false , 'body' => [ '_wpnonce' => $ nonce ] , 'cookies' => $ _COOKIE , 'sslverify' => false , 'timeout' => 0.01 , ] ) ; if ( is_wp_error ( $ result ) ) { WsLog :: l ( 'Error in wp2staticProcessQueueAdminPost. Request to admin-post.php failed: ' . json_encode ( $ result -> errors ) ) ; } }
Make a non-blocking POST request to run wp2staticProcessQueue.
Make a non - blocking POST request to run wp2staticProcessQueue .