function _bucket_mb($post) { wp_nonce_field('applegate_save_product', 'applegate_product_nonce'); $buckets = get_post_meta($post->ID, 'applegate_buckets', true); if (function_exists('get_buckets')) { foreach (get_buckets() as $bucket_ID => $bucket) { ?> <label> <input type="checkbox" name="applegate_buckets[]" value="<?php echo $bucket_ID; ?> " <?php echo in_array($bucket_ID, $buckets) ? 'checked' : ''; ?> /> <?php echo $bucket['title']; ?> </label> <br/> <?php } } }
function _applegate_bucket_wptoolbar($wp_admin_bar) { if (is_admin()) { return; } $bucket = applegate_get_bucket(); $args = array('id' => 'applegate_bucket', 'title' => 'Current Bucket: ' . ($bucket ? get_buckets()[$bucket]['title'] : 'None')); $wp_admin_bar->add_node($args); }
/** * Output the custom store bucket. */ function output_store() { $store_items = get_buckets('Support CC', ''); if (count($store_items) > 0) { ?> <div class="five columns omega"> <div class="bucket"> <div class="inner"> <h3 class="title">Support CC</h3> <div class="content"> <div class="sample"> <div id="store"> <div class="swag"> <?php foreach ($store_items as $si) { ?> <div class="slide"> <a href="<?php echo $si->link_rss; ?> "> <img src="<?php echo $si->link_image; ?> " alt="<?php echo $si->link_name; ?> " /> </a> </div> <?php } ?> </div> </div> </div> <h5><?php echo $si->link_description; ?> </h5> <?php echo nl2br($si->link_notes); ?> <div class="bucket-follow"><a href="https://creativecommons.net/">Ways to support CC...</a></div> </div> <!--! end of "content" --> </div> <!--! end of "inner" --> </div> <!--! end of "bucket" --> </div> <!--! end of "five columns omega" --> <?php } }
?> <?php $top_level = applegate_get_top_bucket_parent(get_the_ID()); ?> <div class="bucket-gutter <?php echo $bucket; ?> "> <div class="row"> <div class="columns small-12"> <a href="<?php echo get_permalink($top_level); ?> "> <?php $buckets = get_buckets(); $bucket = $buckets[$bucket]; echo "<span class=\"left\"><span class=\"fa fa-{$bucket['icon']}\"></span></span>"; echo $bucket['title']; ?> </a> </div> </div> </div> <nav id="bucket-menu"> <div class="row collapse"> <div class="small-12 columns"> <?php if ($descendants = get_descendants($top_level, 'any')) { ?>