wp_stateless_batch_state

wp_stateless_batch_state

Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wp-stateless.4.0.4

apply_filters('wp_stateless_batch_state') is found 6 times:

  • /lib/classes/batch/class-batch-task-manager.php line 311
       */
      public function pause_task($state, $params) {
        $this->pause();
    
        return apply_filters('wp_stateless_batch_state', $state, []);
      }
    
      /**
       * Resume the batch task
       * 
       * @param array $state
    
  • /lib/classes/batch/class-batch-task-manager.php line 324
       */
      public function resume_task($state, $params) {
        $this->resume();
    
        return apply_filters('wp_stateless_batch_state', $state, []);
      }
    
      /**
       * Get the state key
       * 
       * @return string
    
  • /lib/classes/class-api.php line 288
          static public function batchState(\WP_REST_Request $request) {
            try {
              return new \WP_REST_Response(array(
                'ok' => true,
                'data' => apply_filters('wp_stateless_batch_state', [], $request->get_params()),
              ));
            } catch (\Throwable $e) {
              return new \WP_Error('internal_server_error', $e->getMessage(), ['status' => 500]);
            }
          }
    
    
  • /lib/classes/class-migrator.php line 374

    Warning: Undefined array key 376 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    Warning: Undefined array key 377 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    Warning: Undefined array key 378 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    Warning: Undefined array key 379 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

        $email = $params['email'] ?? '';
    
        BatchTaskManager::instance()->start_task($class, $file, $email);
    
        return apply_filters('wp_stateless_batch_state', $state, []);
      }
    }
    
    
    
    
    
  • /lib/classes/status/class-migrations.php line 166
          'can_resume'  => false,
        ];
    
        $this->_set_primary_migration_id();
        $batch_state = $state ? $state : apply_filters('wp_stateless_batch_state', [], []);
        $this->_set_running_migration_id($batch_state);
    
        foreach ($this->migrations as $id => $migration) {
          $status = $migration['status'];
          $can_start = $this->primary_migration_id == $id;
          $can_pause = false;
    
  • /lib/cli/class-sm-cli-command.php line 336
         * 
         * @return array
         */
        private function _get_migrations() {
          $migrations = apply_filters('wp_stateless_batch_state', [], ['force_migrations' => true]);
          return $migrations['migrations'] ?? [];
        }
    
        /**
         * List migrations
         */
    

See this hook used in plugins: