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
.cards { | |
display: flex; | |
align-items: stretch; | |
justify-content: space-between; | |
max-width: $row-width; | |
list-style: none; | |
margin: 0; | |
@media #{$medium-up} { | |
> * { |
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 the sub site's site/home url can not be changed from the WP admin, the following SQL | |
# queries will change the necessary fields to map a domain to a sub site. | |
# presuming the sub site ID that we are changing is 1… | |
UPDATE `wp_blogs` SET domain='smsmagazine.com.au', path='/' WHERE blog_id = 1; | |
UPDATE `wp_options` SET option_value='https://smsmagazine.com.au/' WHERE option_name='siteurl'; | |
UPDATE `wp_options` SET option_value='https://smsmagazine.com.au/' WHERE option_name='home'; |
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
// allow editors to manage gravity forms | |
// allow editors to use Appearance menu | |
// allow editors to manage co-authors plus plugin, create guest authors | |
// allow editors to manage Privacy sub-menu under Settings | |
function dmc_modify_editor_role() { | |
$role = get_role( 'editor' ); | |
$capabilities = array( | |
'gform_full_access', |
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
<hr /> | |
<article class="copy"> | |
<h1>Responsive Typography for dummies</h1> | |
<pre>h1 { | |
@include responsive-type(22px, 38px); | |
}</pre> | |
<p><strong>A "let the mixin do all the work" approach</strong> to the wonderful <code>calc()</code> liquid and molten text. This is all based off the great work done <a href="https://madebymike.com.au/writing/precise-control-responsive-typography/">by mike</a></p> | |
<p>Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em></p> | |
<h2>A Level two header that has a lot of text in it for the molten-lettering and showing off that the <a href="typecast.com/blog/a-more-modern-scale-for-web-typography">line height drops</a> as it gets smaller.</h2> |
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
wp post list --post_type=page --fields=ID --format=csv | xargs -I % wp post meta get % _wp_page_template |
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
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\u@\h \[\033[32m\]\W\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ " |
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
wp post list --post_type=dmc-sief-project --fields=ID --format=csv | xargs -I % wp post meta delete % _thumbnail_id |
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
# move up X directories, if no argument move up 1 | |
up(){ | |
local d="" | |
limit=$1 | |
for ((i=1 ; i <= limit ; i++)) | |
do | |
d=$d/.. | |
done | |
d=$(echo $d | sed 's/^\///') | |
if [ -z "$d" ]; then |
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
# rsync wp uploads directory from staging to current site, exclude .pdf files | |
# uses command line argument $1 for prod or staging ssh alias | |
getups() { | |
current=${PWD##*/} | |
cd ~/Sites/$current/wp-content/uploads || return | |
rsync -avzW --progress --exclude '*.pdf' --exclude '*.docx' $current-$1:~/www/wp-content/uploads/* . | |
} | |
pushups() { | |
current=${PWD##*/} |
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
# pull a staging WP database to an existing local site | |
# uses current directory as theme path and ssh alias | |
pullstage() { | |
START=$(date +%s) | |
# get current directory name, used for database and URL | |
# TODO: use echo get_template_directory() and get characters from right to first / | |
current=${PWD##*/} | |
cd ~/Sites/$current | |
# make a backup of the current local database | |
wp db export _db.sql |