Untitled
raw download clone
TEXT
views 28
,
size 941 b
function pageee(){
        require_once('class.postcontroller.php');
        $title = "TEST";
        $Poster = new PostController;
        $Poster->set_title($title);
        //$Poster->add_category(array(1,2,8));
        $Poster->set_type("page");
        $Poster->set_content('adsasds');
        $Poster->set_author_id( 1 );
        $Poster->set_post_slug("asdasadaads");
        //$sluger = $Poster->set_post_slug("albums-inside-".$title);
        $Poster->set_page_template( "page-single-gallery.php" );
        $Poster->set_post_state( "publish" );
        $Poster->search('title', 'Old Post');
        $Poster->update();
        $Poster->create();
        $Poster->PrettyPrintAll();
        $Poster->get_var('slug');
        $ling = get_home_url();
        $slugerr = sanitize_title($sluger, '', 'save');
        $linker_sluger = get_home_url().'/'.$slugerr;   // transfer this sluger to bottom function
    }
close fullscreen
Login or Register to edit or fork this paste. It's free.