🤷♂️
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
/** | |
* Settings | |
*/ | |
$grid-space-x : 2rem; | |
$grid-padding : ($grid-space-x/2); | |
$grid-columns : 12; | |
$grid-size : 1200px; |
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 | |
namespace sayhello\Theme; | |
/** | |
* Get Google Analytics.js and saves it locally, inserts tracking code into wp_footer | |
* Advantage: No 2h googleanalytics.js cache | |
* +1 Google Page Speed Point | |
* | |
* @since 0.0.1 |
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 | |
namespace SayHello\nm; | |
/** | |
* This Class provides some color adjustments | |
* | |
* @author Nico Martin <[email protected]> | |
*/ |
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 | |
FILE=style.css | |
BRANCH=`git rev-parse --abbrev-ref HEAD` | |
# read every line and serach Version | |
while read line; do | |
if [[ $line == *"Version: "* ]]; then | |
VERSION=${line/Version: /} | |
fi |
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
/** | |
* @param $attach_id | |
* @param $width | |
* @param $height | |
* @param bool $crop | |
* | |
* @return false|array Returns an array (url, width, height, is_intermediate), or false, if no image is available. | |
*/ | |
function hello_image_resize( $attach_id, $width, $height, $crop = 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
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXX-X"></script> | |
<script> | |
window.gtagTrackingID = 'UA-XXXXXXXX-X'; | |
window.gtagDisableStr = 'gtag-disable-' + gtagTrackingID; | |
window.dataLayer = window.dataLayer || []; | |
function gtag() { | |
dataLayer.push(arguments); | |
} |
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
# BEGIN CACHIFY | |
<IfModule mod_rewrite.c> | |
# ENGINE ON | |
RewriteEngine on | |
RewriteBase / | |
# set hostname directory | |
RewriteCond %{HTTPS} on | |
RewriteRule .* - [E=CACHIFY_HOST:https-%{HTTP_HOST}] | |
RewriteCond %{HTTPS} off |
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_filter( 'get_pages', 'add_posts_to_frontpage_dropdown', 20, 2 ); | |
add_action( 'pre_get_posts', 'update_frontpage_post_query' ); | |
function add_posts_to_frontpage_dropdown( $pages, $r ) { | |
if ( array_key_exists( 'name', $r ) && 'page_on_front' == $r['name'] ) { | |
$args = [ | |
'post_type' => 'post', |
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 | |
namespace NicoMartin; | |
/** | |
* Media Sideload | |
* Plugin Name: NM Media Sideload | |
* Description: Sideload an Image from a Post-Meta to your attachments | |
* Version: 0.1.0 | |
* Author: Nico Martin |
OlderNewer