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
| <div class="bg-header" | |
| <?php | |
| /* | |
| This is to show a custom field from an article. | |
| It will need to be created in the metadata section before it can be used in the post edit area. | |
| In this case the custom field will need to be called 'image' and be set as an image custom field in the dropdown for type. | |
| */ | |
| $image = article_custom_field('image'); // Applying a variable to the custom field, so it can be reused with ease | |
| if ( !empty($image) ) : // Check if the field is empty, if it is the process stops here |
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
| /* | |
| <?php while(mytheme_page_children()): ?> | |
| <?php echo page_title(); ?> | |
| <?php endwhile; ?> | |
| */ | |
| function mytheme_page_children() { | |
| if( ! Registry::has('page_original')) { |
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
| /* Loop | |
| <?php while(get_child()): ?> | |
| // links, img, custom fields | |
| <?php endwhile; ?> | |
| */ | |
| /* Function */ | |
| function get_child($original='') { | |
| if( ! Registry::has('page_original')) { | |
| Registry::set('page_original', $original); |
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
| <?php | |
| if(!r::is_ajax()) notFound(); | |
| header('Content-type: application/json; charset=utf-8'); | |
| $data = $pages->find('blog')->children()->visible()->paginate(10); | |
| $json = 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
| <?php | |
| $list = $page->children()->paginate(10); | |
| $pagination = $list->pagination(); | |
| ?> | |
| <ul> | |
| <?php foreach($list as $item): ?> | |
| <li><!-- item html --></li> |
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
| <?php | |
| class kirbytextExtended extends kirbytext { | |
| function __construct($text=false, $markdown=true, $smartypants=true { | |
| parent::__construct($text, $markdown, $smartypants); | |
| // define custom tags | |
| $this->addTags('figure'); |
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
| <?php | |
| /** | |
| * Plugin Name: T5 Preset editor post content | |
| * Description: Default text for post content. | |
| * Author: Thomas Scholz | |
| * Author URI: http://toscho.de | |
| * Version: 2012.04.17.2 | |
| */ | |
| /* |
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
| // Photoshop Script to Create iPhone Icons from iTunesArtwork | |
| // | |
| // WARNING!!! In the rare case that there are name collisions, this script will | |
| // overwrite (delete permanently) files in the same folder in which the selected | |
| // iTunesArtwork file is located. Therefore, to be safe, before running the | |
| // script, it's best to make sure the selected iTuensArtwork file is the only | |
| // file in its containing folder. | |
| // | |
| // Copyright (c) 2010 Matt Di Pasquale | |
| // Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com |