This file contains hidden or 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
| https://octoclub.ru/d/28-%D0%BA%D0%B0%D0%BA-%D1%81%D0%B4%D0%B5%D0%BB%D0%B0%D1%82%D1%8C-pretty-%D1%86%D0%B2%D0%B5%D1%82%D0%BD%D1%83%D1%8E-%D1%84%D0%BE%D1%80%D0%BC%D1%83-%D0%BA%D0%B0%D0%BA-%D1%83-rainlab-blog-%D0%B8%D0%BB%D0%B8-static-pages |
This file contains hidden or 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
| В списке брони нужно изменить значения столбца room (по дефолту это id'шники) на название этого гостиничного номера. | |
| Данные атрибуты у столбца room установить на: | |
| type: partial | |
| path: column_room (можно своё) | |
| Создать файл _column_room.htm в папке того контроллера Room: | |
| <?php | |
| use \path\to\models\Room; |
This file contains hidden or 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
| Модель::all()->last()->vlk_file->getPath(); | |
| Другой вариант: | |
| // Это в обычной функции | |
| $images = array(); | |
| // $records равен запросу в бд с выборкой чего-либо | |
| foreach($records as $index => $record) | |
| $images[$index] = \System\Models\File::where('attachment_id', $record->id)->get(); |
This file contains hidden or 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
| rimraf node_modules/ |
This file contains hidden or 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
| remove_action( 'wp_head', 'wp_resource_hints', 1); | |
| remove_action( 'wp_head', 'feed_links',2); | |
| remove_action( 'wp_head', 'feed_links_extra',3); | |
| remove_action( 'wp_head', 'rsd_link'); | |
| remove_action( 'wp_head', 'wlwmanifest_link'); | |
| remove_action( 'wp_head', 'wp_shortlink_wp_head'); | |
| remove_action( 'wp_head', 'wp_generator'); | |
| remove_action( 'wp_head', 'print_emoji_detection_script', 7); | |
| remove_action( 'wp_print_styles', 'print_emoji_styles'); | |
| remove_action( 'wp_head', 'rest_output_link_wp_head'); |
This file contains hidden or 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
| Результат: site.ru/news/42 | |
| site.ru/news - страница новостей (category-news.php). Т. е. это категория, а не страница. | |
| Но её точно так же можно кастомизировать, как и страницу. | |
| site.ru/news/42 - конкретная новость (single.php) | |
| Что делать: | |
| 1. Создать РУБРИКУ "Новости" с ярлыком (слагом) "news". | |
| 2. В папке с темой создать файл category-news.php и выводить записи (новости) по ID рубрики: | |
| $paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1; | |
| $query = array( |
This file contains hidden or 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
| В папке с темой создать: framework-customizations\extensions\media\extensions\slider\extensions\<название кастомного слайдера> | |
| Структура: static, views, config.php, manifest.php, options (опции при создании слейдера и опции конкретного слайдА) | |
| В папке views должен быть файл с таким же названием слайдера (test-slider.php): | |
| <?php if (!defined('FW')) die('Forbidden'); ?> | |
| <?php if (isset($data['slides'])): ?> | |
| //Дальше творим, что хотим | |
| <div class='owl-carousel owl-theme'> |
This file contains hidden or 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 my_more_options() { | |
| add_settings_field('phone', 'Телефон', 'display_phone', 'general'); | |
| register_setting('general', 'company_phone'); | |
| } | |
| add_action('admin_init', 'my_more_options'); | |
| function display_phone() { | |
| echo "<input type='text' name='company_phone' autocomplete='off' value='".esc_attr(get_option('company_phone'))."'>"; | |
| } |
This file contains hidden or 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
| Плагины (Ctrl + Shift + P > Install Package): | |
| Emmet - ускоряет написание HTML и CSS кода до скорости света. Урок по Emmet; | |
| AutoFileName - дополняет код при написании путей до файлов в вёрстке; | |
| Gist - подключает в Sublime Text возможность использовать сервис сниппетов кода GitHub Gist. Урок по Gist; | |
| Sass - плагин для подсветки Sass синтаксиса в Sass и Scss файлах. Раскрывает Emmet в Sass файлах | |
| One Dark Color Scheme - цветовая схема для подсветки кода; | |
| One Dark Material - Theme - тема оформления UI Sublime Text. | |
| Preferences > Settings |