Skip to content

Instantly share code, notes, and snippets.

View craigsimps's full-sized avatar

Craig Simpson craigsimps

View GitHub Profile
<?php
/**
* Slider brick.
*
* @since 1.0.0
*/
namespace Project\Theme;
use Gamajo\ThemeToolkit\Brick;
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
// IE10+ CSS here
}
<?php
add_filter( 'rcp_login_redirect_url', __NAMESPACE__ . '\\login_redirect', PHP_INT_MAX, 2 );
/**
* @param string $redirect URL to redirect user to.
* @param object $user WP_User object
*
* @return mixed
*/
function login_redirect( $redirect, $user ) {
<?php
add_action( 'genesis_after_header', __NAMESPACE__ . '\\output_slider' );
/**
* Output our slider component after the header.
*
* @since 1.0.0
*/
function output_slider() {
<?php
/**
* Stop Genesis adding `header-*` classes to <body>.
*
* @since 1.0.0
*/
remove_filter( 'body_class', 'genesis_header_body_classes' );
<?php
add_filter( 'gform_enable_field_label_visibility_settings', '__return_true' );
<?php
add_filter( 'genesis_link_post_title', '__return_false' );
<?php
add_action( 'template_redirect', __NAMESPACE__ . '\\hide_single_testimonials' );
/**
* We don't want to show single testimonials, only the archive.
*
* If someone tries to visit a single testimonial this action will ping them back to the testimonials archive.
*
* @since 1.0.0
*/
<?php
add_action( 'genesis_meta', __NAMESPACE__ . '\\remove_redundant_markup' );
/**
* Remove the redundant .site-inner and .content-sidebar-wrap markup.
*
* @since 1.0.0
*/
function remove_redundant_markup() {
<?php
/**
* Generico Core
*
* Core plugin, holding theme-agnostic functionality specific to the site.
*
* @package Generico\Core
* @author Craig Simpson <craig@craigsimpson.scot>
* @license MIT
* @link https://craigsimpson.scot