Skip to content

Instantly share code, notes, and snippets.

View kalamalahala's full-sized avatar

Tyler Karle kalamalahala

View GitHub Profile
@kalamalahala
kalamalahala / class-gv-rest-views-route.php
Last active July 11, 2023 23:51
Format changed by parameter
<?php
public function get_sub_item( $request ) {
$url = $request->get_url_params();
$view_id = intval( $url['id'] );
$entry_id = intval( $url['s_id'] );
$format = \GV\Utils::get( $url, 'format', 'json' );
if (isset($_GET['gv_response_format'])) {
$format = $_GET['gv_response_format'];
}
<?php
public function twilio_csv_show_results()
{
// Exit unless the stars are aligned
if (!$_POST['csv-submit']) return 'Form was not submitted.';
if ($_POST['confirm-twilio'] !== 'confirm') return 'Confirmation box wasn\'t checked.';
if (!$_POST['body']) return 'No message to send!';
// Start tracking execution time