开发者 | dflydev |
---|---|
更新时间 | 2012年12月14日 05:05 |
PHP版本: | 2.8.6 及以上 |
WordPress版本: | 3.5 |
[gist id=546764]
[gist id=546764 file=file.txt]
[gist id=546764 file=file.txt bump=1]
[gist]http://gist.github.com/546764[/gist]
Cache is implemented with the Transients API to minimize delay on loading
content. Default TTL (time to live) is 86400 seconds or one day.
Upcoming features:
/wp-content/plugins/
directoryDefine EMBED_GISTHUB_USERNAME and EMBED_GISTHUB_PASSWORD in wp-settings.php.
Yes. Use a unique bump value to force cache to update. For instance, if you have
the following:
[gist id=546764]
The cache can be broken by specifying a bump value:
[gist id=546764 bump=1]
To break the cache again later, change to a new unique bump value:
[gist id=546764 bump=2]
Yes. Specify a TTL (in seconds) like this:
[gist id=546764 ttl=3600]
Yes.
<?php echo embed_github_gist(546764); ?>
Ues. You can use the file
parameter:
[gist id=546764 file=file.txt]