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
/** | |
* WordPress allows UTF8 characters such as copyright symbol in filenames but these break in Safari | |
* | |
* @see https://wordpress.org/support/topic/uploaded-image-with-accents-in-name-image-dont-show-in-safari-6 for original function | |
* @see https://core.trac.wordpress.org/ticket/22363 for progress on fixing this bug | |
* | |
* #wordpress | |
*/ | |
function sanitize_filename_on_upload($filename) { | |
$ext = end(explode('.',$filename)); |
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
<? | |
// Ping Facebook with (via a POST request) to refresh the cache (scrape) for a scheduled post as it is published | |
// Relevant docs: https://developers.facebook.com/docs/opengraph/using-objects#selfhosted-update | |
// Place this in your Wordpress functions.php file | |
add_action('transition_post_status', 'purge_future_post', 10, 3); | |
function purge_future_post($new_status, $old_status, $post) { | |
if($new_status == 'publish') { |
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 class to .content | |
add_filter( 'genesis_attr_content', 'beatm_facetwp_class' ); | |
function beatm_facetwp_class( $attributes ) { | |
$attributes['class'] = $attributes['class']. ' facetwp-template'; | |
return $attributes; | |
} |