Last active
September 8, 2020 12:35
-
-
Save DxDiagDx/0561b3955c70a9baf82a25b36a3fa432 to your computer and use it in GitHub Desktop.
Pods: Получаем информацию со страницы настроек
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
/* ========== Получаем информацию о компании со страницы настроек ==========*/ | |
function get_company_details() | |
{ | |
$pod = pods('company-info'); | |
$fields = array( | |
'company-phone' => $pod-> field('company-phone'), | |
'company-email' => $pod-> field('company-email'), | |
'company-time' => $pod-> field('company-time'), | |
); | |
return$fields; | |
} |
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 | |
/* Выводим информацию в шаблоне страницы */ | |
$company_details = get_company_details(); | |
?> | |
<div id="company-info"> | |
<span><?php echo $company_details['company-phone']; ?></span> | |
<span><?php echo $company_details['company-email']; ?></span> | |
<span><?php echo $company_details['company-time']; ?></span> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment