forked from bellthomas/Wordpress_PostController
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
39 lines (26 loc) · 817 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
/**
* @author Harri Bell-Thomas <[email protected]>
* @created January, 2014
* @version 1.0.0
* @license Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
* @license url : http://creativecommons.org/licenses/by-sa/3.0/
*/
/* INCLUDE WRAPPER */
require_once('class.postcontroller.php');
/* USAGE */
$Poster = new PostController;
$Poster->set_title( "My Post's Title" );
$Poster->add_category(array(1,2,8));
$Poster->set_type( "post" );
$Poster->set_content( "This my awesome content" );
$Poster->set_author_id( 1 );
$Poster->set_post_slug( 'updated_post' );
//$Poster->set_page_template( "login-infusion-page.php" );
$Poster->set_post_state( "publish" );
$Poster->search('title', 'Old Post');
$Poster->update();
//$Poster->create();
//$Poster->PrettyPrintAll();
$Poster->get_var('slug');
?>