Skip to content

Instantly share code, notes, and snippets.

View awhite92's full-sized avatar
🏴‍☠️
"The rats have prevailed." — The New York Times

Aaron White awhite92

🏴‍☠️
"The rats have prevailed." — The New York Times
View GitHub Profile
@FranciscoG
FranciscoG / acf_repeater_shortcode.php
Last active April 18, 2024 00:00
An Advanced Custom Fields shortcode that allows to loop through a field with a repeater. This only handles simple cases, it can't handle nested repeater fields
<?php
/**
* ACF Pro repeater field shortcode
*
* I created this shortcode function because it didn't exist and it was being requested by others
* I originally posted it here: https://support.advancedcustomfields.com/forums/topic/repeater-field-shortcode/
*
* @attr {string} field - (Required) the name of the field that contains a repeater sub group
* @attr {string} sub_fields - (Required) a comma separated list of sub field names that are part of the field repeater group
* @attr {string} post_id - (Optional) Specific post ID where your value was entered. Defaults to current post ID (not required). This can also be options / taxonomies / users / etc
@dhanyn10
dhanyn10 / wordpress-custom-walker-menu.php
Last active December 3, 2019 02:12
Simple guide to creating your own custom wordpress Walker Menu, insert to functions.php
<?php
/*
=====================
custom menu
=====================
<ul>
<1><3></4></2>
<1>
<3></4>
<5>
@paulirish
paulirish / what-forces-layout.md
Last active September 22, 2024 17:26
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@gunjanpatel
gunjanpatel / amazon-ec2-ftp.md
Last active October 10, 2023 15:31
amazon ec2 LAMP and FTP installation and setup