Created
January 22, 2018 08:04
-
-
Save wokamoto/6ca10bced5ca18562273745b50a7a428 to your computer and use it in GitHub Desktop.
[WordPress][CloudFront] ログイン時にプレビューが即時反映されない問題に対する fix 案
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 | |
// CloudFront で Cookie key wordpress_last_visit をオリジンに渡すようにしておくこと | |
add_action( 'plugins_loaded', function(){ | |
if ( is_user_logged_in() ) { | |
setcookie( 'wordpress_last_visit', time() ); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment