|
@@ 458-470 (lines=13) @@
|
| 455 |
|
* @param string|array $template_path |
| 456 |
|
* @return object $this |
| 457 |
|
**/ |
| 458 |
|
public function show_on_template( $template_path ) { |
| 459 |
|
if ( is_array( $template_path ) ) { |
| 460 |
|
foreach ( $template_path as $path ) { |
| 461 |
|
$this->show_on_template( $path ); |
| 462 |
|
} |
| 463 |
|
|
| 464 |
|
return $this; |
| 465 |
|
} |
| 466 |
|
|
| 467 |
|
$this->settings['show_on']['template_names'][] = $template_path; |
| 468 |
|
|
| 469 |
|
return $this; |
| 470 |
|
} |
| 471 |
|
|
| 472 |
|
/** |
| 473 |
|
* Hide the container from pages whose template has filename $template_path. |
|
@@ 478-489 (lines=12) @@
|
| 475 |
|
* @param string|array $template_path |
| 476 |
|
* @return object $this |
| 477 |
|
**/ |
| 478 |
|
public function hide_on_template( $template_path ) { |
| 479 |
|
if ( is_array( $template_path ) ) { |
| 480 |
|
foreach ( $template_path as $path ) { |
| 481 |
|
$this->hide_on_template( $path ); |
| 482 |
|
} |
| 483 |
|
return $this; |
| 484 |
|
} |
| 485 |
|
|
| 486 |
|
$this->settings['show_on']['not_in_template_names'][] = $template_path; |
| 487 |
|
|
| 488 |
|
return $this; |
| 489 |
|
} |
| 490 |
|
|
| 491 |
|
/** |
| 492 |
|
* Show the container only on hierarchical posts of level $level. |