Skip to content

Instantly share code, notes, and snippets.

@trueqap
Last active August 23, 2018 08:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save trueqap/9ce3d3c13e06b0ee2e18bf263e4e9862 to your computer and use it in GitHub Desktop.
Save trueqap/9ce3d3c13e06b0ee2e18bf263e4e9862 to your computer and use it in GitHub Desktop.
WordPress Facebook HTTPS like probléma megoldása
<?php
global $post;
$ssl_valtas_datuma = strtotime( "2018-08-22" );
$post_datum = strtotime( $post->post_date );
if ( $ssl_valtas_datuma >= $post_datuma ) {
$url_cim = get_permalink();
$url_cim = str_replace('https','http',$url_cim);
} else {
$url_cim = get_permalink();
}
?>
<div class="fb-share"><div class="fb-like" data-href="<?php echo $url_cim; ?>" data-width="220" data-layout="button_count" data-action="like" data-show-faces="false" data-share="true"></div></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment