Skip to content

Instantly share code, notes, and snippets.

@masonjo
masonjo / Dataset (Faster)
Created February 1, 2022 23:48
DataTables for ptclinic8
<?php
if (!defined('canInclude')) {
header('Location:/ca/report/?page=_base');
}
$hide_pager = true;
$todoPresetData = ORM::for_table('todo_preset')->where_not_equal('retired', 1)->find_array();
$todoPresetData = json_encode($todoPresetData);
?>
<div class="container-fluid m-a-xs" >
<div class="row" >
@Dasutin
Dasutin / retronas_on_unraid.md
Last active March 9, 2025 05:21
RetroNAS on Unraid

RetroNAS on Unraid

This guide is intended for installing RetroNAS on an already configured Unraid server. If you're not familiar with Unraid or RetroNAS, head over to the RetroNAS GitHub page to learn about RetroNAS and consider setting it up on a Raspberry Pi.

Unraid NFS Setup

Within Unraid, enable NFS by going to Settings and NFS.

  • Enable NFS: Yes
  • Click Apply
@joseph-farruggio
joseph-farruggio / get_parent_block_field.php
Last active January 22, 2023 23:12
Returns a specified field from the parent ACF block.
<?php
/**
* Returns a specified ACF field from a parent block
* @param string $child_id The ID of the child ACF block
* @param string $child_name The name of the child ACF block
* @param string $parent_name The name of the parent ACF block
* @param string $field The name of the parent's custom field to return
* @param boolean $return_first If $field is an array, optionally return the first item.
*/
function get_field_from_parent($child_id, $child_name, $parent_name, $field, $return_first = false) {
@SteveJonesDev
SteveJonesDev / accessible-menu.php
Last active April 25, 2025 12:06
Accessible WordPress Navigation Menu
<div class="menu-container">
<button class="menu-button" aria-expanded="false" aria-controls="site-header-menu" aria-label="<?php esc_attr_e( 'Menu', 'textdomain' ); ?>"></button>
<div id="site-header-menu" class="site-header-menu">
<?php
wp_nav_menu(
array(
'theme_location' => 'primary',
'container' => 'nav',
'container_class' => 'main-navigation',
'container_id' => 'site-navigation',