WordpressImporter::postProcessExposedContent PHP Method

postProcessExposedContent() public method

public postProcessExposedContent ( GBExposedContent $obj )
$obj GBExposedContent
    function postProcessExposedContent(GBExposedContent $obj)
    {
        # Draft objects which have never been published does not have a slug, so
        # we derive one from the title:
        if (!$obj->slug) {
            $obj->slug = gb_cfilter::apply('sanitize-title', $obj->title);
        } else {
            $obj->slug = preg_replace('/\\/+/', '-', urldecode($obj->slug));
        }
        # pathspec
        if ($obj instanceof WPPost) {
            $obj->name = 'content/posts/' . $obj->published->utcformat('%Y/%m/%d-') . $obj->slug . '.html';
        } else {
            $obj->name = 'content/pages/' . $obj->slug . '.html';
        }
    }