WP_Hook::remove_all_filters()
Removes all callbacks from the current filter.
Метод класса: WP_Hook{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$WP_Hook = new WP_Hook(); $WP_Hook->remove_all_filters( $priority );
- $priority(int|false)
- The priority number to remove.
По умолчанию: false
Список изменений
С версии 4.7.0 | Введена. |
Код WP_Hook::remove_all_filters() WP Hook::remove all filters WP 6.6.1
public function remove_all_filters( $priority = false ) { if ( ! $this->callbacks ) { return; } if ( false === $priority ) { $this->callbacks = array(); $this->priorities = array(); } elseif ( isset( $this->callbacks[ $priority ] ) ) { unset( $this->callbacks[ $priority ] ); $this->priorities = array_keys( $this->callbacks ); } if ( $this->nesting_level > 0 ) { $this->resort_active_iterations(); } }