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
/* | |
Offsets from https://raw.githubusercontent.com/tilomitra/pure/d7f85e37abec3fdab14a541305ad05783159655c/src/grids/css/grids-offsets.css | |
Media queries from Pure v0.5.0 | |
Copyright 2014 Yahoo! Inc. All rights reserved. | |
Licensed under the BSD License. | |
https://github.com/yui/pure/blob/master/LICENSE.md | |
*/ | |
@media screen and (min-width: 35.5em) { | |
.offset-sm-0 { | |
margin-left: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
#!/usr/bin/env bash | |
valet stop | |
composer global remove laravel/valet | |
composer global remove weprovide/valet-plus | |
brew services stop --all | |
brew uninstall dnsmasq | |
sudo rm -rf /usr/local/etc/dnsmasq.conf | |
sudo rm -rf /usr/local/Cellar/dnsmasq |
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
/** | |
* Filter the_time function to show posts as being from another date/time. | |
* | |
* @param string $formatted The formatted time. | |
* @param string $format The time format used. | |
* @return string Modified formatted time. | |
*/ | |
function cc_time_machine( $formatted, $format ) { | |
$offset = get_option( 'cc_time_offset' ); // Offset in days, can be negative. | |
if ( $offset ) { |
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 | |
/** | |
* Exclude posts with term 'bananas' from Search. | |
*/ | |
function cc_search_filter( $query ) { | |
if ( ! is_admin() && $query->is_main_query() ) { | |
if ( $query->is_search ) { | |
$query->set( | |
'tax_query', | |
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 | |
/** | |
* Exclude posts with 'fruit' custom meta field value of 'bananas' from site Search | |
*/ | |
function cc_search_filter( $query ) { | |
if ( ! is_admin() && $query->is_main_query() ) { | |
if ( $query->is_search ) { | |
$query->set( 'meta_query', | |
array( | |
'relation' => 'OR', |
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 | |
/** | |
* Update .htaccess to whitelist logo when modified in platform settings. | |
*/ | |
function cc_logo_htaccess() { | |
// Fire only on Platform Settings options page. | |
$screen = get_current_screen(); | |
if ( 'cc-configurator_page_cc-settings' === $screen->id && ( $_POST['acf']['field_576c2a5137029'] || $_POST['acf']['field_576c2a9e3702a'] ) ) { | |
// Store files in an 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
#!/bin/bash | |
# | |
# Manage .htpasswd files | |
# Store script name for use in output. | |
me=$( basename $0 ) | |
# Utility function for exiting. |
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 | |
/** | |
* Clone of wp_count_comments from WP4.2. | |
*/ | |
function myblogs_count_comments( $post_id = 0 ) { | |
global $wpdb; | |
$post_id = (int) $post_id; | |
/** | |
* Filter the comments count for a given post. |