PHP code example of monitorbacklinks / yii2-wordpress
1. Go to this page and download the library: Download monitorbacklinks/yii2-wordpress library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
monitorbacklinks / yii2-wordpress example snippets
// The user profile will be fetched from cache if available.
// If not, the query will be made against XML-RPC API and cached for use next time.
$profile = Yii::$app->blog->cache(function (Wordpress $blog) {
return $blog->getProfile();
});
$blogPosts = Yii::$app->blog->cache(function (Wordpress $blog) {
// ... queries that use query cache ...
return $blog->noCache(function (Wordpress $blog) {
// this query will not use query cache
return $blog->getPosts();
});
});