Skip to content

Instantly share code, notes, and snippets.

View chaselivingston's full-sized avatar

Chase Livingston chaselivingston

View GitHub Profile
if ( !empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
$forwarded_ips = explode( ',', $_SERVER['HTTP_X_FORWARDED_FOR'] );
$_SERVER['REMOTE_ADDR'] = $forwarded_ips[0];
unset( $forwarded_ips );
}
HTTP/1.1 403 Forbidden
Date: Tue, 06 Sep 2016 17:23:06 GMT
Server: Apache
Last-Modified: Sun, 12 Jun 2016 20:37:56 GMT
Accept-Ranges: bytes
Content-Length: 1027
X-Powered-By: Loading
Content-Type: text/html
<HTML>
add_action('wp_enqueue_scripts', create_function(null, "wp_dequeue_script('devicepx');"), 20);
<?php if ( function_exists( 'jetpack_breadcrumbs' ) ) : ?>
<div class="breadcrumb-area">
<div class="wrapper">
<?php jetpack_breadcrumbs(); ?>
</div><!-- .wrapper -->
</div><!-- .breadcrumb-area -->
<?php endif; ?>
function jeherve_multiple_images_pinterest( $url ) {
global $post;
if ( ! $post ) {
return $url;
}
$url = '//www.pinterest.com/pin/create/button/?url=' . rawurlencode( get_permalink( $post->ID ) ) . '&description=' . rawurlencode( $post->post_title );
return $url;
curl -A "Jetpack by WordPress.com" -is -H 'Content-Type: text/xml' --data '<?xml version="1.0"?><methodCall><methodName>demo.sayHello</methodName><params></params></methodCall>' 'http://www.henleyherald.com/xmlrpc.php' --referer foo && echo
[response_body] => <br />
<b>Deprecated</b>: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Warning</b>: Cannot modify header information - headers already sent in <b>Unknown</b> on line <b>0</b><br />
function jeherve_publicize_hashtags() {
$post = get_post();
if ( ! empty( $post ) ) {
// Create our custom message
$custom_message = '&nbsp;';
update_post_meta( $post->ID, '_wpas_mess', $custom_message );
}
}
<meta property="og:description" content="[ad_1] More viewers tuned in to the much-awaited reunion of Bianca (Kim Chiu) and Gabriel (Gerald Anderson) in the Kap
function no_photon_by_page() {
if ( is_page( 2372 ) ) {
add_filter( 'jetpack_photon_skip_image', '__return_true');
}
}
add_action('wp', 'no_photon_by_page');