/** * Изменение логотипа на страницу */ public function loginHeadHookLogo() { $imageUrl = fruitframe_get_option('logo_url') ? fruitframe_get_option('logo_url') . '?' . time() : get_bloginfo('template_directory') . '/images/logo.png'; $imageInfo = @getimagesize($imageUrl); if (!empty($imageInfo)) { $marginLeft = $imageInfo[0] > 320 ? ($imageInfo[0] - 320) / 2 : null; $width = $imageInfo[0] > 320 ? $imageInfo[0] : '326'; echo '<style type="text/css"> h1 a { background-image: url(' . $imageUrl . ') !important; margin-bottom: 1em; background-size: auto !important; height: ' . $imageInfo[1] . 'px !important; width: ' . $width . 'px !important; ' . ($marginLeft ? 'margin-left: -' . $marginLeft . 'px' : '') . '} </style>'; } }
/** * If time change is more then X days returns formatted date. X can be set in Fruitframe Options * Elsewise return time-difference * @param integer $time1 * @param integer $time2 * @return string */ function fruitframe_human_time_left($time1, $time2) { if (abs($time1 - $time2) > 24 * 3600 * fruitframe_get_option('person-birthday-soon')) { return FALSE; } return 'через ' . human_time_diff($time1, $time2); }
public function getCategoryColor() { $categories = $this->getCategories(); $color = ''; if (count($categories)) { $color = get_field('color', 'category_' . $categories[0]->term_id); } if (!$color) { $color = fruitframe_get_option('color_uncategorized_post'); } return $color; }
public function getOptionLang($slug) { return fruitframe_get_option($slug . '-' . $this->getCurrentLang()); }
<div class="row"> <label for="contact-phone-small" class="label">Телефон</label> <div class="inp_text_wrap inp_text_wrap_81"><input type="text" id="contact-phone-small" name="phone_code" class="inp_text"/></div> <div class="inp_text_wrap"><input type="text" id="contact-phone" name="phone" class="inp_text"/></div> </div> <div class="row"> <label for="contact-company" class="label">Организация</label> <div class="inp_text_wrap"><input type="text" id="contact-company" name="company" class="inp_text"/></div> </div> <div class="row"> <label for="contact-subject" class="label">Тема <span class="star">*</span></label> <div class="select"> <select id="contact-subject" name="subject" class="ikselect required"> <option value="">Выберите тему письма</option> <?php foreach (explode(',', fruitframe_get_option('contact-subjects')) as $subject) { ?> <option value="<?php echo $subject; ?> "><?php echo $subject; ?> </option> <?php } ?> </select> </div> </div> <div class="row">
/** * Find twitter username in link to twitter profile * * @return string */ function fruitframe_get_twitter_name() { preg_match('~([^/]+)$~si', fruitframe_get_option('twitter'), $matches); return $matches[1]; }