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 | |
// add filter to body_class | |
add_filter( 'body_class', 'q_body_class', 1 ); | |
/* | |
* add extra classes to html body tag | |
*/ | |
function q_body_class( $classes ) { |
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 | |
/** | |
* Get Post object by post_meta query | |
* | |
* @use $post = get_post_by_meta( array( meta_key = 'page_name', 'meta_value = 'contact' ) ) | |
* @since 1.0.4 | |
* @return Object WP post object | |
*/ | |
function get_post_by_meta( $args = array() ) |
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 | |
// filter to exclude specified post_meta from Polylang Sync ## | |
add_filter( 'pll_copy_post_metas', 'q_pll_copy_post_metas' ); | |
/** | |
* Remove defined custom fields from Polylang Sync | |
* | |
* @since 0.1 | |
* @param Array $metas |
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
public static function delete_signup( $key ) { | |
// get signup from $key ## | |
$signup = GFSignup::get( $key ); | |
// return error, if nothing found ## | |
if( is_wp_error( $signup ) ) { | |
return $signup; | |
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 | |
/* | |
Plugin Name: Force SSL URL Scheme | |
Plugin URI: https://gist.github.com/cliffordp/6378826 | |
Description: Force the protocol scheme to be HTTPS when is_ssl() doesn't work. Recommended to me by Jason Cohen of WP Engine on 2013-08-28. | |
Version: 1.0.1 | |
Author: WebAware | |
Author URI: http://www.webaware.com.au/ | |
*/ |
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
// Gravity Forms Post Render ## | |
$( document ).bind( 'gform_post_render', function(){ | |
// notify ## | |
//console.log("GF Rendered"); | |
// look for li.limit_date ## | |
if ( $("li.limit_date").length ) { | |
// default mindate and maxdate values ## |
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 | |
/** | |
* Run a Google query | |
* | |
* @since 0.1 | |
* @return void | |
*/ | |
public static function google_query( $query = null ){ |
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 | |
namespace q\test; | |
class url { | |
// results ## | |
public static | |
$results = [ | |
'url' => 'MISSING', |
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
'use strict'; | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
// ------- configuration ------- ## | |
// common SCSS root for easier SCSS @use / @forward / @incuse usage ## | |
includePaths: [ | |
'./library/theme/scss/' // common SCSS root ## |
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
class ui { | |
function hello( $args = null ) { | |
// define key + value to render ## | |
return [ | |
'hello' => 'Hello' | |
]; | |
} |
OlderNewer