Skip to content

Instantly share code, notes, and snippets.

View kostyakoz's full-sized avatar
🏠
Working from home

Kostya kostyakoz

🏠
Working from home
View GitHub Profile
@kostyakoz
kostyakoz / anchor.php
Last active December 20, 2015 19:18 — forked from Abban/anchor.php
Перевод на русский
<?php
// В файле anchor/libraries/anchor.php меняем строки 50 - 65 с:
public static function functions() {
if( ! is_admin()) {
$fi = new FilesystemIterator(APP . 'functions', FilesystemIterator::SKIP_DOTS);
foreach($fi as $file) {
if($file->isFile() and $file->isReadable() and '.' . $file->getExtension() == EXT) {
<?php $years = array(); $months = array(); ?>
<?php if(has_posts()): while(posts()): ?>
<?php $y = date('Y', article_time()); $m = date('F', article_time()); ?>
<?php if( ! in_array($y, $years)): $years[] = $y; ?>
<h1><?php echo $y; ?></h1>
<?php endif; ?>