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
function jetpackme_filter_exclude_category( $filters ) { | |
$filters[] = array( 'not' => array( | |
'terms' => array( 'category.slug' => | |
array( 'donotshow', 'events' ) | |
) | |
) ); | |
return $filters; | |
} | |
add_filter( |
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
Requested URL: https://public-api.wordpress.com/rest/v1/sites/ocadernodereceitas.com.br | |
Response Code: 200 | |
Response: | |
{ | |
"ID": 113937576, | |
"name": "O Caderno de Receitas", | |
"description": "Comida de m\u00e3e colocada \u00e0 prova, palpites e uma pitada de nostalgia. Por Mariana Weber", | |
"URL": "http:\/\/ocadernodereceitas.com.br", | |
"jetpack": true, | |
"subscribers_count": 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
if ( !empty( $_SERVER['HTTP_INCAP_CLIENT_IP'] ) ) { | |
$forwarded_ips = explode( ',', $_SERVER['HTTP_INCAP_CLIENT_IP'] ); | |
$_SERVER['REMOTE_ADDR'] = $forwarded_ips[0]; | |
unset( $forwarded_ips ); | |
} |
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
if ( !empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) { | |
$forwarded_ips = explode( ',', $_SERVER['HTTP_X_FORWARDED_FOR'] ); | |
$_SERVER['REMOTE_ADDR'] = $forwarded_ips[0]; | |
unset( $forwarded_ips ); | |
} |
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
add_filter( 'jetpack_sharing_pinterest_widget_type', 'bk_jetpack_pinterest_widget' ); | |
function bk_jetpack_pinterest_widget( $widget ){ | |
return 'buttonBookmark'; | |
} |
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
function cl_tweak_carousel() { | |
global $post; | |
if ( $post->ID == 23) { | |
return true; | |
} | |
} | |
add_filter( 'jp_carousel_maybe_disable', 'cl_tweak_carousel'); |
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
if ( ! isset( $content_width ) ) { | |
$content_width = 730; | |
} |
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
function jetpackme_exclude_related_post( $exclude_post_ids, $post_id ) { | |
// $post_id is the post we are currently getting related posts for | |
$exclude_post_ids[] = 871; | |
return $exclude_post_ids; | |
} | |
add_filter( 'jetpack_relatedposts_filter_exclude_post_ids', 'jetpackme_exclude_related_post', 20, 2 ); |
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
## EXPIRES CACHING ## | |
ExpiresActive On | |
ExpiresByType image/jpg "access 1 year" | |
ExpiresByType image/jpeg "access 1 year" | |
ExpiresByType image/gif "access 1 year" | |
ExpiresByType image/png "access 1 year" | |
ExpiresByType text/css "access 1 month" | |
ExpiresByType application/pdf "access 1 month" | |
ExpiresByType text/x-javascript "access 1 month" |
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
add_filter( 'pre_option_job_manager_alerts_page_id', 'wpml_pre_option_job_manager_alerts_page_id' ); | |
function wpml_pre_option_job_manager_alerts_page_id( $id ) { | |
return icl_object_id( $id, 'post', true ); | |
} |