Enlighten
Enlighten is a collection of Wordpress optimizations, useful template tags, and shortcodes. It includes a modified version of the cleanup optimizations from Roots Theme.
Hooks into wp_enqueue_style allowing automatic compilation of SCSS files. Compiled stylesheets are saved to the Wordpress uploads directory.
Template Tags
the_content_from($page /* ID, slug or title */, $suppress_filters = false)
get_template_part_for($slug, [$name = '',] $args)
The enlighten_loop template tag emulates a WP_Query style loop. It has a couple advantages over using a WP_Query object directly though. Most noticeably the ability to easily place an existing array of posts into a loop.
// Possible arguments are: a WP_Query object, WP_Query args or an array of posts
$loop = enlighten_loop(array(
'post_type' => 'events',
'no_paging' => true,
'meta_key' => 'date',
'orderby' => 'meta_value',
'order' => 'DESC'
));
while ($loop->have_posts()) : $loop->the_post();
the_content();
endwhile;
add_post_thumbnail($name, $id, $post_types = array('page', 'post'))
has_post_thumbnail_src($multi_post_thumbnail = '')
the_post_thumbnail_src($size = 'full', $background_image = false, $multi_post_thumbnail = '')
Current Version:0.1.3