View attach-order-files-to-wc-order-email.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Attach files to WooCommerce order email | |
Plugin URI: https://www.damiencarbery.com/2021/05/attach-files-to-woocommerce-order-email/ | |
Description: Upload files to an order to attach them to the WooCommerce Order Completed email. | |
Author: Damien Carbery | |
Author URI: https://www.damiencarbery.com | |
Version: 0.1 | |
*/ |
View genesis-hide-old-post-dates.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Genesis Hide Old Post Dates | |
Plugin URI: https://www.damiencarbery.com/2021/02/hide-old-post-dates-in-genesis/ | |
Description: Do not show post date on posts older than 30 days. | |
Author: Damien Carbery | |
Author URI: https://www.damiencarbery.com | |
Version: 0.2 | |
*/ |
View delete-orders.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
// Restrict who can access this script. | |
$permitted_ips = array('12.34.56.78', '87.65.43.21'); | |
if (in_array($_SERVER['REMOTE_ADDR'], $permitted_ips) == false) { | |
header('HTTP/1.0 403 Forbidden'); | |
die(); | |
} | |
*/ |
View acf-percentage-circle.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: ACF - Percentage Circle | |
Plugin URI: https://www.damiencarbery.com/2020/11/percentage-circle-block/ | |
Description: Block to display a percentage circle with animation. Based on: https://codepen.io/sergiopedercini/pen/jmKdbj | |
Author: Damien Carbery | |
Version: 0.1 | |
*/ |
View email-order-details.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Order details table shown in emails. | |
* | |
* This template can be overridden by copying it to yourtheme/woocommerce/emails/email-order-details.php. | |
* | |
* HOWEVER, on occasion WooCommerce will need to update template files and you | |
* (the theme developer) will need to copy the new files to your theme to | |
* maintain compatibility. We try to do this as little as possible, but it does | |
* happen. When this occurs the version of the template file will be bumped and |
View json-encoded-markup.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener("DOMContentLoaded", function(event) { | |
let logos = ["<div class=\"item\"><img src=\"https:\/\/dummyimage.com\/400x400\/306933\/afb3f0.png&text=1\" \/><\/div>", "etc", "etc"]; | |
fisherYates(logos); // Shuffle the array. | |
var logos_html = ""; | |
logos.forEach(function(item, index, array) { | |
logos_html += item; | |
}) | |
var container = document.getElementById( "logos" ); | |
container.innerHTML = logos_html; | |
}); |
View accordion-block-export.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<item> | |
<title>Accordion block</title> | |
<link>https://example.com/genesis_custom_block/accordion-block/</link> | |
<pubDate>Tue, 15 Sep 2020 12:16:12 +0000</pubDate> | |
<dc:creator><![CDATA[me]></dc:creator> | |
<guid isPermaLink="false">https://example.com/?post_type=genesis_custom_block&p=8</guid> | |
<description></description> | |
<content:encoded><![CDATA[{"genesis-custom-blocks\/accordion-block":{"name":"accordion-block","title":"Accordion block","excluded":[],"icon":"list","category":{"slug":"widgets","title":"Widgets","icon":null},"keywords":[""],"fields":{"title":{"name":"title","label":"Title","control":"text","type":"string","order":0,"location":"editor","width":"100","help":"","default":"","placeholder":"","maxlength":null},"content":{"name":"content","label":"Content","control":"textarea","type":"textarea","order":1,"location":"editor","width":"100","help":"","default":"","placeholder":"","maxlength":null,"number_rows":4,"new_lines":"autop"}}}}]]></content:encoded> | |
<excerpt:encoded><![CDATA[]]></excerpt: |
View css-slider.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>CSS fade in/out slider</title> | |
</head> | |
<?php | |
$slides = array( '<div><img src="http://placekitten.com/g/612/612"/></div>', | |
'<div><img src="https://unsplash.it/id/237/612/612"/></div>', | |
'<div><img src="https://unsplash.it/id/400/612/612"/></div>', | |
'<div><img src="https://unsplash.it/id/181/612/612"/></div>', |
View block-accordion-block.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<details class="genesis-custom-block <?php block_field('className'); ?>"> | |
<summary class="item-title"><?php block_field( 'title' ); ?></summary> | |
<div class="item-content"><?php block_field( 'content' ); ?></div> | |
</details> |