PHP code example of magicalella / yii2-wswordpress

1. Go to this page and download the library: Download magicalella/yii2-wswordpress 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/ */

    

magicalella / yii2-wswordpress example snippets


 'components' => [
     // ...
     'wswordpress' => [
         'class' => 'magicalella\wswordpress\Wswordpress',
         'endpoint' => 'URL API Wordpress',
         'method' => 'GET'
     ],
 ]
 

 $wswordpress = Yii::$app->wswordpress;
 $result = $wswordpress->call('wp/v2/...',[
     'param'=>value_param
     ]
 );
 

 php composer.phar