钩子文档

tables_to_repair

💡 云策文档标注

概述

本文档介绍 WordPress 中的 'tables_to_repair' 过滤器,用于扩展数据库表修复功能。开发者可以通过此过滤器添加额外的表名到修复列表中。

关键要点

  • 'tables_to_repair' 是一个过滤器,允许开发者自定义需要修复的数据库表。
  • 参数 $tables 是一个字符串数组,包含带前缀的表名。
  • 此过滤器从 WordPress 3.0.0 版本开始引入。

代码示例

$tables = array_merge( $tables, (array) apply_filters( 'tables_to_repair', array() ) );

📄 原文内容

Filters additional database tables to repair.

Parameters

$tablesstring[]
Array of prefixed table names to be repaired.

Source

$tables = array_merge( $tables, (array) apply_filters( 'tables_to_repair', array() ) );

Changelog

Version Description
3.0.0 Introduced.