/** * Vrátí odkaz a image tag na náhledový obrázek v Large velikosti. * * @author Martin Hlaváč * @link http://www.ktstudio.cz * * @param string $imageSize * @param string $tagId * @param string $tagClass * @param string $imageAttr * * @return mixed null|string (HTML) */ public function getThumbnailImageWithSelfLink($imageSize = KT_WP_IMAGE_SIZE_MEDIUM, $tagId = "thumbImage", $tagClass = "gallery", $imageAttr = array("class" => "img-responsive")) { if ($this->getModel()->hasThumbnail()) { $titleAttribute = $this->getModel()->getTitleAttribute(); $attachment = get_post($this->getModel()->getThumbnailId()); if (KT::issetAndNotEmpty($attachment->post_title)) { $imageAttr["alt"] = $attachment->post_title; } if (!array_key_exists("alt", $imageAttr)) { $imageAttr["alt"] = $titleAttribute; } $image = $this->getThumbnailImage($imageSize, $imageAttr); $linkImage = $this->getThumbnailImagePermalink(); $isTagContainer = KT::issetAndNotEmpty($tagId) && KT::issetAndNotEmpty($tagClass); $html = null; if ($isTagContainer) { $html .= KT::getTabsIndent(0, "<div id=\"{$tagId}\" class=\"{$tagClass}\">", true); } $html .= KT::getTabsIndent(1, "<a href=\"{$linkImage}\" title=\"{$titleAttribute}\" class=\"fbx-link\" rel=\"lightbox\">", true); $html .= KT::getTabsIndent(2, $image, true); $html .= KT::getTabsIndent(1, "</a>", true); if ($isTagContainer) { $html .= KT::getTabsIndent(0, "</div>", true, true); } return $html; } return null; }
/** * Výpis informací pod čarou pro editaci uživatelského profilu * * @author Martin Hlaváč * @link http://www.ktstudio.cz * * @param string $class */ public function renderInformation($class = null) { $classAttribute = KT::issetAndNotEmpty($class) ? " class=\"{$class}\"" : ""; echo KT::getTabsIndent(0, "<p{$classAttribute}>", true); echo KT::getTabsIndent(1, __("*) Změní se pouze ty hodnoty, které jsou vyplněné a změněné.", "KT_CORE_DOMAIN") . "<br />", true); echo KT::getTabsIndent(1, __("**) Hesla musejí být v případě změny shodná.", "KT_CORE_DOMAIN"), true); echo KT::getTabsIndent(0, "</p>", true, true); }
/** * Výpis informací pod čarou pro editaci uživatelského profilu * * @author Martin Hlaváč * @link http://www.ktstudio.cz * * @param string $class */ public function theInfo($class = "textCenter") { echo KT::getTabsIndent(0, '<p class="' . $class . '">', true); echo KT::getTabsIndent(1, __("*) Změní se pouze ty hodnoty, které jsou vyplněné a změněné.", KT_DOMAIN) . "<br />", true); echo KT::getTabsIndent(1, __("**) Hesla musejí být v případě změny shodná.", KT_DOMAIN), true); echo KT::getTabsIndent(0, "</p>", true, true); }