|
@@ 69-81 (lines=13) @@
|
| 66 |
|
return $this->get_template( $env, $context, 'sidebar', $name ); |
| 67 |
|
} |
| 68 |
|
|
| 69 |
|
public function get_template_part( \Twig_Environment $env, $context, $slug, $name = null ) { |
| 70 |
|
|
| 71 |
|
try { |
| 72 |
|
$return = twig_include( $env, $context, $this->get_templates( $slug, $name ) ); |
| 73 |
|
do_action( "get_template_part_{$slug}", $slug, $name ); |
| 74 |
|
} catch ( \Twig_Error_Loader $e ) { |
| 75 |
|
ob_start(); |
| 76 |
|
get_template_part( $slug, $name ); |
| 77 |
|
$return = ob_get_clean(); |
| 78 |
|
} |
| 79 |
|
|
| 80 |
|
return $return; |
| 81 |
|
} |
| 82 |
|
|
| 83 |
|
/** |
| 84 |
|
* Skips rendering in native function in favor of Plugin->get_search_form() in filter |
|
@@ 93-105 (lines=13) @@
|
| 90 |
|
return apply_filters( 'get_search_form', true ); |
| 91 |
|
} |
| 92 |
|
|
| 93 |
|
protected function get_template( \Twig_Environment $env, $context, $type, $name = null ) { |
| 94 |
|
|
| 95 |
|
try { |
| 96 |
|
$return = twig_include( $env, $context, $this->get_templates( $type, $name ) ); |
| 97 |
|
do_action( 'get_' . $type, $name ); |
| 98 |
|
} catch ( \Twig_Error_Loader $e ) { |
| 99 |
|
ob_start(); |
| 100 |
|
call_user_func( 'get_' . $type, $name ); |
| 101 |
|
$return = ob_get_clean(); |
| 102 |
|
} |
| 103 |
|
|
| 104 |
|
return $return; |
| 105 |
|
} |
| 106 |
|
|
| 107 |
|
public function comments_template( \Twig_Environment $env, $context, $file = 'comments.twig', $separate_comments = false ) { |
| 108 |
|
|