Skip to content

Instantly share code, notes, and snippets.

View byron-roots's full-sized avatar

Byron Fitzgerald byron-roots

View GitHub Profile
@byron-roots
byron-roots / $data.txt
Created February 2, 2022 10:24
Group Booking GForms
// For 2 entries
// First Entry
array(18) {
["input_15"]=>
string(5) "24422"
["input_3_2"]=>
string(3) "Mr."
["input_3_3"]=>
string(5) "Byron"
@byron-roots
byron-roots / hgvkml.kml
Created October 26, 2021 15:43
HGV Kml Test
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>Directions from Barnwell Rd, Alconbury, Huntingdon PE28, UK to Barnwell Rd, Alconbury, Huntingdon PE28,
UK
</name>
<Style id="icon-1899-DB4436-nodesc-normal">
<IconStyle>
<color>ff3644db</color>
<scale>1</scale>
@byron-roots
byron-roots / visitorkml.kml
Last active October 26, 2021 15:44
Visitor KML test
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>Directions from The Blvd, Alconbury, Huntingdon PE28 4WY, UK to Barnwell Rd, Alconbury, Huntingdon PE28,
UK
</name>
<Style id="icon-1899-DB4436-nodesc-normal">
<IconStyle>
<color>ff3644db</color>
<scale>1</scale>
@byron-roots
byron-roots / examples_template.html
Created July 8, 2020 09:00
Perch Field type to chose a page in a selectize
<!-- In admin show all pages from the parent page venue (Uses path not name) -->
<perch:content id="pages" type="page_list" label="Pages" parent="venues" suppress/>
<!-- In admin show all pages and limit to 1 selection -->
<perch:content id="pages" type="page_list" label="Pages" max="1" suppress/>
<!-- Output the page path in template -->
<perch:content id="pages" type="page_list" output="pagePath" />
@byron-roots
byron-roots / calendar-fieldtype.class.php
Last active March 20, 2020 11:46
calendar fieldtype
<?php
/**
* Class PerchFieldType_Calendar
*
* A field type for allowing users to select dates using a calendar
*
* Examples:
* <perch:events id="eventStarts" type="calendar" time="true" multiple="false" label="Start Date" required help="Date the event starts at" suppress/>
*
UPDATE wp_options SET option_value = replace(option_value, 'https://newurl.com', 'http://oldurl.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = replace(post_content, 'https://newurl.com', 'http://oldurl.com');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'https://newurl.com', 'http://oldurl.com');
UPDATE wp_usermeta SET meta_value = replace(meta_value, 'https://newurl.com', 'http://oldurl.com');
UPDATE wp_links SET link_url = replace(link_url, 'https://newurl.com', 'http://oldurl.com');