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
// Here's a little mixin I created to style some custom SoundCloud players | |
// $size = the size of the arwork box (also size of margins for track info + waveform) | |
// $title-color = the color of the track title | |
// $waveform-color = color of the audio waveform | |
// $play-color = color of the player indicator bar (current track position in playback) | |
// | |
// Usage: @include scplayer (60px, #001825, #aaa, #777) | |
@mixin scplayer($size, $title-color, $waveform-color, $play-color) { |
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
{ | |
// Set your VSCode Workspace root to the root folder of your Local site. | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Listen for XDebug", | |
"type": "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
# put this in your .zshrc file, change path to store zip, restart terminal | |
# run command `releasezip my-files-1.0`, which would create a zip at ../my-files-1.0.zip | |
# change output path (../) to whatever you want, for example Users/Me/Plugins/Releases/$1.zip | |
releasezip() { | |
zip -r ../$1.zip . -x '*.git*' --exclude=\*.DS_Store\* | |
open ../ | |
} |
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
/* | |
* Populate Envira Gallery with ACF gallery field | |
* | |
* Filters the gallery $data and replaces with the image data for our images in the ACF gallery field. | |
* | |
* @uses ACF Pro | |
* @uses Envira Gallery | |
* @param $data | |
* @param $gallery_id | |
*/ |
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 | |
// first, get the image ID returned by ACF | |
$image_id = get_field('my_image_field'); | |
// and the image size you want to return | |
$image_size = 'thumbnail'; | |
// use wp_get_attachment_image_src to return an array containing the image | |
// we'll pass in the $image_id in the first parameter |
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
const fetch = require('node-fetch'); | |
try { | |
// Specify the name of the template the app will integrate with | |
const APP_BLOCK_TEMPLATES = ['product', 'collection']; | |
const getOptions = { method: 'GET', headers: { 'X-Shopify-Access-Token': accessToken } }; | |
// Get published theme | |
const themeResponse = await fetch(`https://${shop}/admin/api/${API_VERSION}/themes.json`, getOptions); | |
this.checkError(themeResponse, 'ThemeFetchFailure'); |
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
// Escaping Liquid in SCSS. | |
// | |
// Expected output: | |
// a{ | |
// color: {{ settings.link-color }}; | |
// } | |
a{ | |
color: #{'{{ settings.link-color }}'}; | |
} |
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 if (!defined('ABSPATH')) die('Restricted Area'); | |
/* | |
* Plugin Name: Disable Yoast SEO Notifications | |
* Description: Hide annoying notifications after each upgrade of Yoast SEO plugin and others admin notices. | |
* Version: 1.1 | |
* Author: Aurélien Denis | |
* Author URI: https://wpchannel.com/ | |
*/ |
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
/** | |
* useScroll React custom hook | |
* Usage: | |
* const { scrollX, scrollY, scrollDirection } = useScroll(); | |
*/ | |
import { useState, useEffect } from "react"; | |
export function useScroll() { | |
const [lastScrollTop, setLastScrollTop] = useState(0); |
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
//The following section is an add-on to this tutorial - https://tri.be/gravity-forms-events-calendar-submissions/ | |
//Shout to CreativeSlice.com for their initial work | |
/* Before Starting: | |
- Make sure you have these three plugins installed | |
- Gravity Forms | |
- The Events Calendar | |
- Gravity Forms + Custom Post Types | |
- Once Gravity Forms is installed, create a form with these fields | |
- Single Line Text (Event Title) | |
- Paragraph Text (Event Description) |
OlderNewer