WPSEO_Bulk_List_Table::sanitize_order()
Makes sure the order clause is always ASC or DESC for the bulk editor table, thereby preventing a possible CSRF vulnerability.
Метод класса: WPSEO_Bulk_List_Table{}
Хуков нет.
Возвращает
Строку
. SQL order string (ASC, DESC).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->sanitize_order( $order );
- $order(строка) (обязательный)
- Whether we want to sort ascending or descending.
Код WPSEO_Bulk_List_Table::sanitize_order() WPSEO Bulk List Table::sanitize order Yoast 24.4
protected function sanitize_order( $order ) { if ( in_array( strtoupper( $order ), [ 'ASC', 'DESC' ], true ) ) { return $order; } return 'ASC'; }