PHP code example of juzed-dev / wp-cli-faker-fixtures

1. Go to this page and download the library: Download juzed-dev/wp-cli-faker-fixtures 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/ */

    

juzed-dev / wp-cli-faker-fixtures example snippets

yaml
JuZedDev\Fixtures\Entity\Post:
  my_post:
    __construct: [1] # Pass your post ID as the constructor argument
    post_title: '<title()>'
    post_content: '<richText(8, 'medium', ['decorate','link','ul','ol']>'
    post_excerpt: '<paragraphs(1, true)>'
yaml
JuZedDev\Fixtures\Entity\Post:
  post{1..10}:
    __construct: [<postId()>] # Use a custom formatters to return a random post ID as the constructor argument
    post_title: '<title()>'
    post_content: '<richText(8, 'medium', ['decorate','link','ul','ol']>'
    post_excerpt: '<paragraphs(1, true)>'

<title(3,false)>