Skip to content

Instantly share code, notes, and snippets.

View baerkins's full-sized avatar
🌵

Shaun Baer baerkins

🌵
  • Philadelphia, PA
View GitHub Profile
@baerkins
baerkins / yoast
Created June 29, 2017 13:09 — forked from aderaaij/yoast
Wordpress - Move yoast seo boxes to bottom of post/page
// Move Yoast to bottom
function yoasttobottom() {
return 'low';
}
add_filter( 'wpseo_metabox_prio', 'yoasttobottom');
<?php
// Add ACF Options Menu
if ( function_exists("acf_add_options_page") ) {
acf_add_options_page();
}
if ( function_exists("register_options_page") ) {
register_options_page( 'Global Options' );
register_options_page( 'Page Options' );
}
<?php
/**
* Custom Gravity Forms Spinner
*
* @since 1.0.0
*/
add_filter( 'gform_ajax_spinner_url', 'spinner_url', 10, 2 );
function spinner_url( $image_src, $form ) {
<?php
namespace Apollo\Extend\TribeEvents;
// Functions to extend the Events Calendar plugin
// https://theeventscalendar.com/
// Note: it's a rag tag bunch of functions, use are your own risk.
/**
@baerkins
baerkins / auto-gen-taxonomy-term.php
Last active February 6, 2018 14:24
Auto-generate a taxonomy term when a post is created
<?php
/**
* Auto Gen Project Agency Taxonomy when an agency is created
* @link https://gist.githubusercontent.com/brenna/7377802/raw/a5092e5b4bd2a094a6534d73e9f2f81f26783744/wp-autopopulate-taxonomy
*
*/
function FS__Update_Project_Agency_Terms($post_id) {
// Only update terms if it's the post type we want
@baerkins
baerkins / modal.css
Last active August 24, 2018 19:56
Accessible Modal with JS
body.is-locked {
height: 100%;
overflow: hidden;
}
.modal {
display: none;
}
.modal--is-open {
@baerkins
baerkins / development.services.local.yml
Created November 13, 2018 21:00
Local Development Services
# Local development services.
#
# To activate this feature, follow the instructions at the top of the
# 'example.settings.local.php' file, which sits next to this file.
parameters:
http.response.debug_cacheability_headers: true
twig.config:
debug: true
auto_reload: true
cache: false
@baerkins
baerkins / settings.local.php
Last active November 13, 2018 21:01
Local Drupal 8 Settings
<?php
/**
* SAVE FILE TO:
* `[PROJECT_BASE]/web/sites/default`
*
*/
/**
* Enable local development services.