Automattic\WooCommerce\Admin
PageController::get_path_from_id
Returns the path from an ID.
Метод класса: PageController{}
Хуков нет.
Возвращает
string. Path for the given ID, or the ID on lookup miss.
Использование
$PageController = new PageController(); $PageController->get_path_from_id( $id );
- $id(строка) (обязательный)
- ID to get path for.
Код PageController::get_path_from_id() PageController::get path from id WC 11.1.0
public function get_path_from_id( $id ) {
if ( isset( $this->pages[ $id ] ) && isset( $this->pages[ $id ]['path'] ) ) {
return $this->pages[ $id ]['path'];
}
return $id;
}