public function __construct($maxCount = self::DEFAULT_COUNT, $withInitParams = true) { parent::__construct(); $this->maxCount = KT::tryGetInt($maxCount) ?: self::DEFAULT_COUNT; if ($withInitParams) { $this->initParams(); } }
public function __construct() { parent::__construct(); }
/** * Vrátí KT WP Post Model * * @author Tomáš Kocifaj * @link http://www.ktstudio.cz * * @return \KT_WP_Post_Base_Model */ public function getModel() { return parent::getModel(); }
public function __construct() { parent::__construct(); $this->initCurrentSidebar(); }
/** * Výpis postů podle zadané query v zadané loopě * * @author Martin Hlaváč * @link http://www.ktstudio.cz * * @param array $items * @param string $loopName * @param mixed int|null $count * @param mixed int|null $offset * @param array $clearfixes pole clearfixů k printu podle klíče (modulo) */ public static function theItemsLoops(array $items, $loopName, $count = null, $offset = null, array $clearfixes = null) { if (KT::arrayIssetAndNotEmpty($items)) { $isClearfixes = KT::arrayIssetAndNotEmpty($clearfixes); self::$currentItemsLoopIndex = 0; if (KT::tryGetInt($offset) > 0) { $items = array_slice($items, $offset); } if (KT::tryGetInt($count) > 0) { $items = array_slice($items, 0, $count); } foreach ($items as $item) { global $post; $post = $item; include locate_template("loops/loop-{$loopName}.php"); self::$currentItemsLoopIndex++; if ($isClearfixes) { self::theClearfixes($clearfixes, self::$currentItemsLoopIndex); } } self::$currentItemsLoopIndex = null; wp_reset_postdata(); } }
</h1> <h2><?php _e("pro:", "ZZZ_DOMAIN"); ?> <?php echo KT::stringEscape(get_search_query(false)); ?> </h2> </header> <?php if (have_posts()) { ?> <div class="row"> <?php global $wp_query; KT_Presenter_Base::theQueryLoops($wp_query, "search", KT_ZZZ_Posts_Presenter::getClearfixes()); ?> </div> <div id="pagination" class="pagination clearfix"> <?php echo KT::bootstrapPagination(); ?> </div> <?php } else { ?> <div class="row"> <p><?php _e("K dispozici nejsou žádné příspěvky...", "ZZZ_DOMAIN"); ?>
/** * Založení základního presenteru pro výpis komentářů postu * * @author Martin Hlaváč * @link http://www.ktstudio.cz * * @param int $postId */ public function __construct($postId) { parent::__construct(); $this->postId = KT::tryGetInt($postId); }
<div class="row"> <div class="col-md-12"> <header> <h1><?php post_type_archive_title(); ?> </h1> </header> <?php if (have_posts()) { ?> <div class="row"> <?php global $wp_query; $clearfixes = array(2 => "<div class=\"visible-sm-block clearfix\"></div>", 3 => "<div class=\"visible-lg-block visible-md-block clearfix\"></div>"); KT_Presenter_Base::theQueryLoops($wp_query, KT_ZZZ_REFERENCE_KEY, $clearfixes); ?> </div> <div id="pagination" class="pagination clearfix"> <?php echo KT::bootstrapPagination(); ?> </div> <?php } else { ?> <div class="row"> <p><?php _e("K dispozici nejsou žádné příspěvky...", "ZZZ_DOMAIN"); ?>
function __construct(KT_Modelable $model = null) { parent::__construct($model); }