- Consider merging
get_image_tag()
andwp_get_attachment_image()
.- Nah, bad idea. While
get_image_tag()
is only used in the media editor, it probably makes sense to keep the image generation on the back end and front end separated because of how people are likely filtering display.
- Nah, bad idea. While
- Add an event listener to the editor if we can't do a content filter.
- Look into adding needed metadata directly to wp.media to avoid the ajax request
- Add caching to
attachment_url_to_postid
to speed up multiple requests. - Add smart ways to filter
sizes
globally w/o inducing anotherwp_get_attachment_image()
call.
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
// Remove max_srcset_image_width. | |
function remove_max_srcset_image_width( $max_width ) { | |
return false; | |
} | |
add_filter( 'max_srcset_image_width', 'remove_max_srcset_image_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
/** | |
* custom post time function | |
* | |
* @uses global $post, get_the_time() and get_the_date() | |
* @vars $d (for custom date formatting), $t (for custom time formatting) | |
* @returns $my_post_time | |
*/ | |
function my_post_time($d, $t) { | |
global $post; | |
Revised date: 07/11/2012
Between us [company name] and you [customer name]
We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.
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
http://www.refulz.com:8082/index.php#tab2?foo=123 | |
Property Result | |
------------------------------------------- | |
host www.refulz.com:8082 | |
hostname www.refulz.com | |
port 8082 | |
protocol http | |
pathname index.php |
This gist assumes:
- you have a local git repo
- with an online remote repository (github / bitbucket etc)
- and a cloud server (Rackspace cloud / Amazon EC2 etc)
- your (PHP) scripts are served from /var/www/html/
- your webpages are executed by apache
- apache's home directory is /var/www/
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
document.addEventListener('invalid', (function(){ | |
return function(e){ | |
//prevent the browser from showing default error bubble/ hint | |
e.preventDefault(); | |
// optionally fire off some custom validation handler | |
myvalidationfunction(e); | |
}; | |
})(), 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
#!/bin/bash | |
# @gf3’s Sexy Bash Prompt, inspired by “Extravagant Zsh Prompt” | |
# Shamelessly copied from https://github.com/gf3/dotfiles | |
default_username='joemcgill' | |
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then | |
export TERM=gnome-256color | |
elif infocmp xterm-256color >/dev/null 2>&1; then | |
export TERM=xterm-256color |
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
/** | |
* Pinterest Overlay Code | |
* @require jQuery 1.8 | |
*/ | |
var bs_pinButtonURL = "//link.to/image.png"; | |
var bs_pinButtonHeight = 72; | |
var bs_pinButtonWidth = 72; | |
var bs_yourUrl = $(location).attr('host'); | |
var bs_pinButtonPos = "bottomright"; |