开发者 | twicetwomedia |
---|---|
更新时间 | 2020年4月1日 10:39 |
捐献地址: | 去捐款 |
PHP版本: | 5.3 及以上 |
WordPress版本: | 5.4 |
版权: | GPLv3 |
版权网址: | 版权信息 |
**Using Hoeboe with that same Transient outlined above**
$category,
"posts_per_page" => $posts_per_page
)
);
return $posts;
}
$transient_name = "foo_featured_posts";
$my_function_name = 'my_function_to_get_featured_posts';
$category = "featured";
$posts_per_page = "5";
$my_function_parameters = array($category, $posts_per_page);
$transient_expire = 60;
$expiration_time = 12 * HOUR_IN_SECONDS;
if (class_exists('Hoeboe')) {
$hoeboe = new Hoeboe();
$transient_value = $hoeboe->hoeboe__updatetransient($transient_name, $my_function_name, $my_function_parameters, $expiration_time);
}
?>
`
Links
No. Hoeboe works alongside the Transients API to help you cache data better and, ultimately, provide a better user experience for your site visitors.
No. You must implement Hoeboe individually within your theme even after the Hoeboe plugin is activated. Hoeboe is set up this way so that you can pick and choose which transients to use Hoeboe on.
Only a couple of simple steps. Visit the link below for more information. Detailed installation and implementation guide.