This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$page_meta = new_cmb2_box([ | |
'id' => 'page_meta', | |
'title' => 'Page Options', | |
'object_types' => ['page'], | |
'context' => 'normal', | |
'priority' => 'high', | |
'show_names' => true | |
]); | |
$page_meta->add_field([ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!empty($title)) { | |
?> | |
<h4> | |
<?php | |
echo $title; | |
?> | |
</h4> | |
<?php | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Load a template part & pass in variables declared in caller scope. Optionally return as a string. | |
* @param string $path path to template file, minus .php (eg. `content-page`, `partial/folder/template-name`) | |
* @param array $args map of variables to load into scope | |
* @param bool $echo echo or return rendered template | |
* @return null or rendered template string | |
*/ | |
function silencio_partial($path, $args = [], $echo = true) { | |
if (!empty($args)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find [PATH] | xargs grep -P [PATTERN] -ls | less |