Skip to content

Commit

Permalink
Remove partial() and uri() as they are unnecessary
Browse files Browse the repository at this point in the history
  • Loading branch information
atanas-dev committed May 13, 2020
1 parent 7d483a1 commit d812cc2
Showing 1 changed file with 0 additions and 37 deletions.
37 changes: 0 additions & 37 deletions src/Theme/Theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,41 +75,4 @@ public function image() {
public function sidebar() {
return $this->app->resolve( 'wpemerge_theme_core.sidebar.sidebar' );
}

/**
* Render a template partial using \App::render().
* Interface matches get_template_part() with the addition of $context.
*
* @param string $partial
* @param string $child
* @param array $context
* @return void
*/
public function partial( $partial, $child = '', $context = [] ) {
if ( is_array( $child ) ) {
// Optional argument $child not specified, flip input around.
$context = $child;
$child = '';
}

$templates = [];

if ( $child ) {
$templates[] = "views/partials/${partial}-${child}";
}

$templates[] = "views/partials/${partial}";

$this->app->render( $templates, $context );
}

/**
* Alias for WPEmergeThemeCore\Assets\Assets::getThemeUri().
*
* @see \WPEmergeThemeCore\Assets\Assets::getThemeUri
* @return string
*/
public function uri() {
return $this->app->resolve( 'wpemerge_theme_core.assets.assets' )->getThemeUri();
}
}

0 comments on commit d812cc2

Please sign in to comment.