Skip to content

Latest commit

 

History

History
44 lines (28 loc) · 1.05 KB

File metadata and controls

44 lines (28 loc) · 1.05 KB

A collection of Model classes that allows you to get data directly from a WordPress database.

NOW with Multi Site Support

This package keeps all the work from the original jgrossi/Corcel but extends it to support WordPress Multisite.

New functionalities

NOTE

In WordPress the Table where the sites are located is called blogs instead of sites, and the sites table contains the definition of the main container of blogs.

Blog

List all blogs from the connections

use Corcel\Model\Blog;
[...]
$blogs = Blog::get();

Blog Options

use Corcel\Model\Blog;
[...]
$blogs = Blog::get();
foreach($blogs as $blog){
    $data = $blog->options();
    dump($data);
    dump($data->where("option_name", "siteurl")->first());
    /// ...etc
}

Licence

MIT License © Junior Grossi MIT License copyleft - Brede Basualdo Serraino