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 | |
/* | |
Source: http://andrewnorcross.com/tutorials/functions-file/stop-hyperlinking-images/ | |
Description: This removes the auto linking feature for post images in wordpress. By default they link to the "full size" image. This disables linking altogether. Equates to pushing the none button in the media/image tab. | |
*/ | |
$image_set = get_option( 'image_default_link_type' ); | |
if (!$image_set == 'none') { | |
update_option('image_default_link_type', 'none'); | |
} | |
?> |
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
Show hidden characters
{ | |
"files": | |
{ | |
"jQuery": "http://code.jquery.com/jquery.min.js", | |
"modernizr.js": "https://raw.github.com/Modernizr/Modernizr/master/modernizr.js", | |
"normalize.css": "https://github.com/necolas/normalize.css/raw/master/normalize.css", | |
"respond.js": "https://raw.github.com/scottjehl/Respond/master/respond.min.js", | |
"animate.css": "https://raw.github.com/daneden/animate.css/master/animate.css", | |
"h5bp index": "https://raw.github.com/h5bp/html5-boilerplate/master/index.html" | |
}, |
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 | |
/* | |
Plugin Name: Disable plugins when doing local dev | |
Description: If the WP_LOCAL_DEV constant is true, disables plugins that you specify | |
Version: 0.1 | |
License: GPL version 2 or any later version | |
Author: Mark Jaquith | |
Author URI: http://coveredwebservices.com/ | |
*/ |
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 the filter and function to your functions.php file | |
add_filter('body_class', 'add_slug_to_body_class'); | |
function add_slug_to_body_class($classes) { | |
global $post; | |
if(is_page()) { | |
$classes[] = sanitize_html_class($post->post_name); | |
} elseif(is_singular()) { |
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 | |
function remove_thumbnail_dimensions( $html ) { | |
$html = preg_replace( '/(width|height)=\"\d*\"\s/', "", $html ); | |
return $html; | |
} | |
add_filter( 'post_thumbnail_html', 'remove_thumbnail_dimensions', 10 ); | |
add_filter( 'image_send_to_editor', 'remove_thumbnail_dimensions', 10 ); | |
// Removes attached image sizes as well | |
add_filter( 'the_content', 'remove_thumbnail_dimensions', 10 ); | |
?> |
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 -e | |
clear | |
echo "============================================" | |
echo "WordPress Install Script" | |
echo "============================================" | |
echo "Database Name: " | |
read -e dbname | |
echo "Database User: " | |
read -e dbuser | |
echo "Database Password: " |
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
// Original code from http://www.blog.highub.com/mobile-2/a-fix-for-iphone-viewport-scale-bug/ | |
var metas = document.getElementsByTagName('meta'); | |
var i; | |
if (navigator.userAgent.match(/iPhone/i)) { | |
for (i=0; i<metas.length; i++) { | |
if (metas[i].name == "viewport") { | |
metas[i].content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0"; | |
} | |
} |
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
Dear soon-to-be-former user, | |
We've got some fantastic news! Well, it's great news for us anyway. You, on | |
the other hand, are fucked. | |
We've just been acquired by: | |
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 | |
global $post; | |
// Get All children of current page. | |
$children = get_pages(array('child_of' => $post->ID)); | |
// Increment value. | |
$i = 0; | |
foreach ($children as $child){ | |
// Get Image Source | |
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $child->ID ), 'thumbnail' ); | |
// Get Child Title to use as ALT |
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
/*;;. | |
.;;. | |
.;;. | |
.;;. ... ... | |
.;;. .;;;;;;;; ,;;;;;;;: .. ,;;;;;;, .;;, | |
.;;. .;;;;....,. :;;;,...:, .;;. :;;,..,;;;. .;;;; | |
.;;. .;;; :;;: .;;. :;; ,;;;. ;;;; | |
.;;. ,;; ;;, .;; .;;. ;;;, .,. | |
.;;. ;;; .;;. .;; .;;. ;;;. | |
.;;. ;;; :;;. ,;; .;;. :. :;;;. |
OlderNewer