$this->slug(), 'risk' => 'low', 'summary' => 'Rebuilds the URL rewrite rules. Call when pretty permalinks return 404 ' . 'after registering or removing post types, taxonomies, or plugins.', 'annotations' => array( 'destructive' => false, 'idempotent' => true, ), 'input_schema' => array( 'type' => 'object', 'properties' => array(), ), ); } public function dry_run( $atb_input ) { return $this->output( false, true, array( 'rules_count' => $this->current_rules_count() ) ); } public function run( $atb_input ) { flush_rewrite_rules(); return $this->output( true, false, array( 'rules_count' => $this->current_rules_count() ) ); } /** * @return int */ protected function current_rules_count() { $atb_rules = get_option( 'rewrite_rules' ); return is_array( $atb_rules ) ? count( $atb_rules ) : 0; } } }