ActionScheduler_Abstract_ListTable::get_request_orderby()protectedWC 1.0

Return the sortable column specified for this request to order the results by, if any.

Метод класса: ActionScheduler_Abstract_ListTable{}

Хуков нет.

Возвращает

Строку.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_request_orderby();

Код ActionScheduler_Abstract_ListTable::get_request_orderby() WC 8.7.0

protected function get_request_orderby() {

	$valid_sortable_columns = array_values( $this->sort_by );

	if ( ! empty( $_GET['orderby'] ) && in_array( $_GET['orderby'], $valid_sortable_columns, true ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended
		$orderby = sanitize_text_field( wp_unslash( $_GET['orderby'] ) ); //phpcs:ignore WordPress.Security.NonceVerification.Recommended
	} else {
		$orderby = $valid_sortable_columns[0];
	}

	return $orderby;
}