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 | |
# Reset timer | |
SECONDS=0 | |
builddate=`date +"%B %e %Y"` | |
echo "Build begins: "$builddate | |
say Build process commenced $builddate |
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
/** | |
* Get theme folder from theme parameter or use granule | |
* | |
* @returns {String|util.env.theme} | |
*/ | |
function utilGetTheme() { | |
var theme = 'granule'; | |
if ( util.env.theme ) { |
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
# disable access to wp-config.php | |
<files wp-config.php> | |
order allow,deny | |
deny from all | |
</files> | |
# disable public error messages | |
php_flag display_startup_errors on | |
php_flag display_errors on | |
php_flag html_errors on |
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
{ | |
"exclude": ["node_modules/**"], | |
"verbose": true, | |
"remove-empty-rulesets": true, | |
"always-semicolon": true, | |
"color-case": "lower", | |
"block-indent": "\t", | |
"color-shorthand": true, | |
"element-case": "lower", | |
"eof-newline": true, |
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
I think the reason there hasn't been much developer uptake in the auto refresh of the Customizer is that implementation is both: | |
1. complex (using javascript - something many theme developers are unaccustomed to outside of jquery) | |
and 2. has complex documentation. It's only because I've been following the many customizer changes in 4.7 that I have learnt how to implement the things I have. | |
Having now implemented auto updating partials for site title and description in a number of my themes I have seen that it's not as complicated as I first thought. I have also seen that the code is almost identical for each theme. The only thing that has changed is the css selector used to reference the title and description. You can see an example of the js implementation on _s - https://github.com/Automattic/_s/blob/master/js/customizer.js | |
I think that with some additions to the core customizer code we could remove the requirement for the customizer.js file for the most common use cases. | |
What I would like to suggest com |
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: Remove Archive Prefix | |
* Plugin URI: https://www.binarymoon.co.uk/ | |
* Description: Hide the prefix displayed at the start of archive titles. | |
* Author: Ben Gillbanks | |
* Version: 1.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
--- | |
--- | |
/** | |
* Javascript code for https://www.binarysun.co.uk/ | |
*/ | |
{% include_relative bs_favorites.js %} | |
{% include_relative bs_fullscreen.js %} |
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
<link rel="stylesheet" href="{{ "/assets/css/main.css" | relative_url }}?dc={{ site.time | date: '%y%m%d%k%M' }}"> | |
<script src="{{ "/assets/scripts/app.js" | relative_url }}?dc={{ site.time | date: '%y%m%d%k%M' }}"></script> |
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
{% assign width=include.game.game_width | round %} | |
{% if width < 500 %} | |
{% assign width=500 %} | |
{% endif %} | |
<style> | |
.game-container { | |
max-width: {{ width }}px; | |
} | |
.game-container-inner { | |
padding-bottom: {{ include.game.game_height | times: 100 | divided_by: include.game.game_width }}%; |
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
/** | |
* Make last space in a sentence a non breaking space to prevent typographic widows. | |
* | |
* @param type $str | |
* @return string | |
*/ | |
function theme_widont( $str = '' ) { | |
// Strip spaces. | |
$str = trim( $str ); |