Skip to content
Permalink
Browse files

Initialize theme page if previewed when not saved

  • Loading branch information...
Ayoola FALOLA
Ayoola FALOLA committed May 21, 2019
1 parent 6e7da55 commit 0da71038fd682c62aa931debac575c93b784093e
@@ -1346,6 +1346,14 @@ function_exists( 'http_response_code' ) ? http_response_code(404) : null;
// var_export( $PAGE_TEMPLATE_FILE );
if( ! $PAGE_INCLUDE_FILE OR ! $PAGE_TEMPLATE_FILE )
{
// var_export( $pagePaths['include'] );
// save first
// once page is created, let's have blank content
$page = new Ayoola_Page_Editor_Sanitize();
$page->refresh( $uri, $themeName );
// if( )
// not found
return false;
}
@@ -164,8 +164,12 @@ public function sanitize( $themeName = null )
* @param void
* @return boolean
*/
public function refresh( $page )
public function refresh( $page, $themeName = null )
{
if( ! empty( $themeName ) )
{
$this->_parameter['page_editor_layout_name'] = $themeName;
}
$id = $page . Ayoola_Application::getApplicationNameSpace();
if( ! empty( static::$_refreshed[$id] ) )
{

0 comments on commit 0da7103

Please sign in to comment.
You can’t perform that action at this time.