This file contains hidden or 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 | |
add_action( 'gform_after_submission', 'tgm_io_remove_form_entry' ); | |
/** | |
* Prevents Gravity Form entries from being stored in the database. | |
* | |
* @global object $wpdb The WP database object. | |
* @param array $entry Array of entry data. | |
*/ | |
function tgm_io_remove_form_entry( $entry ) { | |
This file contains hidden or 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
#! /bin/bash | |
# Find available updates for WordPress plugins via WP-CLI, then upgrade theme one at a time. | |
# After each upgrade, commit the changed files to Git. | |
# | |
# Requires that WP-CLI be installed and in your path: http://wp-cli.org/ | |
# | |
# Currently, it will only work when run from the root of the WordPress installation, and has | |
# a hard-coded path for wp-content/plugins. | |
# |
This file contains hidden or 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
/** | |
* Gamajo Accessible Menu. | |
* | |
* Improves menu accessibility in two ways: | |
* * Adds a delay to submenus disappearing when moving the mouse away. | |
* * Makes submenus appear when tabbing through menu items with the keyboard. | |
* | |
* Kudos to Rian Rietveld for the code on which this plugin is based. | |
* | |
* After enqueueing this file (or concatenating it with your theme JS file), |
This file contains hidden or 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
add_filter( 'wp_terms_checklist_args', 'ryno_wp_terms_checklist_args', 1, 2 ); | |
function ryno_wp_terms_checklist_args( $args, $post_id ) { | |
$args[ 'checked_ontop' ] = false; | |
return $args; | |
} |
This file contains hidden or 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 | |
define( 'WP_DEBUG', true ); | |
if ( WP_DEBUG ) { | |
define( 'WP_DEBUG_LOG', true ); | |
define( 'WP_DEBUG_DISPLAY', false ); | |
define( 'SAVEQUERIES', true ); | |
define( 'SCRIPT_DEBUG', true ); | |
@ini_set( 'display_errors', 0 ); | |
if ( function_exists( 'xdebug_disable' ) ) { |
This file contains hidden or 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
<script type="text/javascript"> | |
(function () { | |
"use strict"; | |
// once cached, the css file is stored on the client forever unless | |
// the URL below is changed. Any change will invalidate the cache | |
var css_href = './index_files/web-fonts.css'; | |
// a simple event handler wrapper | |
function on(el, ev, callback) { | |
if (el.addEventListener) { | |
el.addEventListener(ev, callback, false); |
This file contains hidden or 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 | |
/** | |
* Primary Nav using Dropdown Walker | |
* | |
* @param array $args | |
* @return array | |
*/ | |
function be_primary_nav_dropdown( $args ) { | |
if( 'primary' !== $args['theme_location'] || !class_exists( 'Walker_Nav_Menu_Dropdown' ) ) |
This file contains hidden or 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
if ( $query->is_home() && $query->is_main_query() ) { | |
$posts_per_page = 8; | |
$page = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 0; | |
$query->set( 'offset', 5 + $posts_per_page * $page ); | |
$query->set( 'posts_per_page', $posts_per_page ); | |
} |