-
-
Save codev0/871cb12399d15ff78f2f999ad570d341 to your computer and use it in GitHub Desktop.
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 | |
$plugin = array( | |
'name' => 'how', | |
'info' => 'Как мы работаем', | |
'view' => 'ucmas_blocks_how_view', | |
'configure' => 'ucmas_blocks_how_configure', | |
'save' => 'ucmas_blocks_how_save', | |
'is_visible' => 'ucmas_is_companion_theme_displayed', | |
); | |
function ucmas_blocks_how_view() { | |
$items = array(); | |
foreach (variable_get('ucmas_blocks_how_texts', _ucmas_block_how_defaults()) as $text) { | |
$items[] = filter_xss_admin($text); | |
} | |
return array( | |
'subject' => 'Как мы работаем', | |
'content' => array( | |
'#theme' => 'item_list', | |
'#items' => $items, | |
), | |
); | |
} | |
function ucmas_blocks_how_configure() { | |
return ucmas_text_block_configure_form( | |
variable_get('ucmas_blocks_how_texts', _ucmas_block_how_defaults()) | |
); | |
} | |
function ucmas_blocks_how_save($edit) { | |
variable_set('ucmas_blocks_how_texts', $edit['texts']); | |
} | |
function _ucmas_block_how_defaults() { | |
return array( | |
'Оставить заявку на сайте или по телефону', | |
'Проводим ознакомительное занятие', | |
'Определяем соответствующую группу', | |
'Заключаем договор', | |
'Приступаем к обучению', | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment