PHP code example of sebkay / oop-wp
1. Go to this page and download the library: Download sebkay/oop-wp 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/ */
sebkay / oop-wp example snippets
use OOPWP\PostTypes\Post;
$blog_post = new Post(get_the_ID());
$blog_post->title();
use OOPWP\PostTypes\Post;
$blog_post = new Post(get_the_ID());
# date() is \Carbon\Carbon object
$blog_post->date()->format('j F Y);