Skip to content

Instantly share code, notes, and snippets.

View csaborio001's full-sized avatar

Christian Saborio csaborio001

View GitHub Profile
@csaborio001
csaborio001 / EventQueryMod.php
Created March 9, 2021 02:11
Modifying Repeater Query from Oxygen for a Particular Custom Post Type
<?php
/**
* Modifies event listing.
*
* @package scorpiotek-wordpress-utilities
*
*/
namespace ScorpioTek\WPUtil\Events;
<?php
/**
* Oxygen helper class to define when to display search results.
*
* @package scorpiotek-wordpress-utilities
*/
namespace ScorpioTek\WPUtil\Oxygen;
class SearchAssist {
@csaborio001
csaborio001 / meow-acf.php
Last active May 11, 2021 12:09
Using Meow Gallery to Display ACF Galleries
// Need to set the shortcut parameter in the post template where the gallery will be displayed.
[meow-gallery acf=1]
// Hook up to intercept the gallery shortcode and check for attribute.
add_filter(
'shortcode_atts_gallery',
function( $result, $defaults, $atts ) {
if ( 1== $atts['acf']) { // The ACF gallery MUST be set to return IDs for this to work!
<?php
/**
* Proptotype
*/
namespace DoggieRescue\Notices;
class AdminNotice {
public static function process_messages() {
$notice = self::get_admin_message();
if ( ! empty( $notice ) && is_array( $notice ) ) {
WP_Rewrite Object
(
[permalink_structure] => /%postname%/
[use_trailing_slashes] => 1
[author_base] => author
[page_structure] => %pagename%
[search_base] => search
[comments_base] => comments
[pagination_base] => page
[comments_pagination_base] => comment-page
'use strict'
const puzzle = {
init: function (start) {
const nextBtn = document.getElementById('next');
nextBtn.dataset.current = start;
},
shuffle: function () {
const puzzContainer = document.getElementById('puzzle-container');
const nextBtn = document.getElementById('next');
$countries = array(
'Afghanistan' => 'Afghanistan',
'Albania' => 'Albania',
'Algeria' => 'Algeria',
'American Samoa' => 'American Samoa',
'Andorra' => 'Andorra',
'Angola' => 'Angola',
'Anguilla' => 'Anguilla',
'Antarctica' => 'Antarctica',
'Antigua and Barbuda' => 'Antigua and Barbuda',
wp.domReady( function() {
//wp.blocks.getBlockTypes().forEach( function( blockType ){ console.log( blockType.name ); });
var core_variations = [
'core/archives',
'core/audio',
'core/avatar',
'core/block',
'core/block',